diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3e9a1865382956bfaaa8bd8a1da80eadf05d38f1..b55ace1dbe6a80fc3a72523928745727558f3994 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1992,11 +1992,6 @@ benchmark_clang8:
 
 benchmark_ClangBuildAnalyzer:
   script:
-    - apt-get update --fix-missing
-    - apt-get -y install apt-transport-https ca-certificates gnupg software-properties-common wget
-    - wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | apt-key add -
-    - apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic main'
-    - apt-get -y install cmake ninja-build
     - cmake --version
     - ccache --version
     - mpirun --version
diff --git a/cmake/waLBerlaFunctions.cmake b/cmake/waLBerlaFunctions.cmake
index e5914ed760b6928d641ef3620a9ee5bef38793b2..cd0796d2bfe589a01f408d4124a90d34f9cfbf19 100644
--- a/cmake/waLBerlaFunctions.cmake
+++ b/cmake/waLBerlaFunctions.cmake
@@ -39,7 +39,7 @@ function ( waLBerla_add_module )
 
     set( ALL_DEPENDENCIES ${ARG_DEPENDS} ${ARG_OPTIONAL_DEPENDS})
     # Module name is the directory relative to WALBERLA_MODULE_DIRS
-    get_current_module_name ( moduleName )
+    get_current_module_name ( )
     get_module_library_name ( moduleLibraryName ${moduleName} )
 
     # Test if all required libraries are available
@@ -234,7 +234,7 @@ function ( waLBerla_compile_test )
     cmake_parse_arguments( ARG "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN} )
 
     # Module name is the directory relative to WALBERLA_MODULE_DIRS
-    get_current_module_name ( moduleName )
+    get_current_module_name ( )
 
     # Filename of first source file is used as name for testcase if no name was given
     if( NOT ARG_NAME )
@@ -365,7 +365,7 @@ function ( waLBerla_execute_test )
    if( ARG_NO_MODULE_LABEL )
       set_tests_properties ( ${ARG_NAME} PROPERTIES LABELS "${ARG_LABELS}" )
    else()
-      get_current_module_name ( moduleName  )
+      get_current_module_name ( )
       set_tests_properties ( ${ARG_NAME} PROPERTIES LABELS "${moduleName} ${ARG_LABELS}" )
    endif()
 
diff --git a/cmake/waLBerlaModuleDependencySystem.cmake b/cmake/waLBerlaModuleDependencySystem.cmake
index 88e0df42efdec6ff7fd2e793a8fb3a135b1bc7dd..fc3ad4f7e8f6979fb867f0e9fea4f8fbe25194ba 100644
--- a/cmake/waLBerlaModuleDependencySystem.cmake
+++ b/cmake/waLBerlaModuleDependencySystem.cmake
@@ -46,20 +46,19 @@
 # Determine Module name using the current folder 
 # 
 # moduleFolder is the current source directory relative to a folder in WALBERLA_MODULE_DIRS
-# If more arguments are given, these are prepended to WALBERLA_MODULE_DIR
+# The variable moduleName will be set in PARENT_SCOPE and is the first folder in WALBERLA_MODULE_DIRS
 # Example:
 #    If CMAKE_CURRENT_SOURCE_DIR is /src/core/field and /src/ is an element in WALBERLA_MODULE_DIRS,
-#    then module name is "core/field"
+#    then moduleName is "core"
 #
 #######################################################################################################################
-function ( get_current_module_name  moduleNameOut )
+function ( get_current_module_name  )
 
     foreach( moduleDir ${ARGN} ${WALBERLA_MODULE_DIRS} )
         file( RELATIVE_PATH moduleFolder ${moduleDir} ${CMAKE_CURRENT_SOURCE_DIR} )
         if ( NOT ${moduleFolder} MATCHES "\\.\\./.*" )
            #append / to make cmake_path also work with one directory only
-           set( moduleFolder "${moduleFolder}/" )
-           cmake_path(GET moduleFolder PARENT_PATH moduleNameOut)
+           string(REGEX REPLACE "(.*)/.*" "\\1" moduleNameOut ${moduleFolder})
            set(moduleName ${moduleNameOut} PARENT_SCOPE)
            return() 
         endif()