diff --git a/cmake/modules/DuneMacros.cmake b/cmake/modules/DuneMacros.cmake
index 6cb493d7f8859727c860be5405a4f7c68d7784b4..cf09115da8a7fce1363d753892635a5c263100f2 100644
--- a/cmake/modules/DuneMacros.cmake
+++ b/cmake/modules/DuneMacros.cmake
@@ -297,7 +297,7 @@ macro(dune_module_information MODULE_DIR)
   # 3. Check for line starting with Depends
   extract_line("Depends:" ${DUNE_MOD_NAME}_DEPENDS "${DUNE_MODULE}")
   if(${DUNE_MOD_NAME}_DEPENDS)
-    split_module_version(${${DUNE_MOD_NAME}_DEPENDS} ${DUNE_MOD_NAME}_DEPENDS_MODULE ${DUNE_MOD_NAME}_DEPENDS_VERSIONS)
+    split_module_version(${${DUNE_MOD_NAME}_DEPENDS} ${DUNE_MOD_NAME}_DEPENDS_MODULE ${DUNE_MOD_NAME}_DEPENDS_VERSION)
     foreach(_mod ${${DUNE_MOD_NAME}_DEPENDS})
       set(${_mod}_REQUIRED REQUIRED)
     endforeach(_mod ${${DUNE_MOD_NAME}_DEPENDS})
@@ -334,6 +334,8 @@ macro(dune_process_dependency_leafs modules versions is_required next_level_deps
   list(LENGTH mmodules mlength)
   list(LENGTH mversions vlength)
   if(NOT mlength EQUAL vlength)
+    message(STATUS "mmodules=${mmodules} modules=${modules}")
+    message(STATUS "mversions=${mversions} versions=${mversions}")
     message(FATAL_ERROR "List of modules and versions do not have the same length!")
   endif(NOT mlength EQUAL vlength)
   if(mlength GREATER 0)
@@ -408,8 +410,8 @@ macro(dune_create_dependency_tree)
   set(ALL_DEPENDENCIES "")
   if(${ProjectName}_DEPENDS_MODULE OR ${ProjectName}_SUGGESTS_MODULE)
     set(ALL_DEPENDENCIES ${${ProjectName}_DEPENDS_MODULE} ${${ProjectName}_SUGGESTS_MODULE})
-    dune_create_dependency_leafs("${${ProjectName}_DEPENDS_MODULE}" "${${ProjectName}_DEPENDS_VERSIONS}"
-      "${${ProjectName}_SUGGESTS_MODULE}" "${${ProjectName}_SUGGESTS_VERSIONS}")
+    dune_create_dependency_leafs("${${ProjectName}_DEPENDS_MODULE}" "${${ProjectName}_DEPENDS_VERSION}"
+      "${${ProjectName}_SUGGESTS_MODULE}" "${${ProjectName}_SUGGESTS_VERSION}")
   endif(${ProjectName}_DEPENDS_MODULE OR ${ProjectName}_SUGGESTS_MODULE)
   set(_my_path "")
   if(ALL_DEPENDENCIES)