diff --git a/etc/config.sh/FFTW b/etc/config.sh/FFTW
index 7c0a48861d18f46df946629b0996f97baa014924..f3cb4ea70ee775ef7e4da0f1800c00833e099f6a 100644
--- a/etc/config.sh/FFTW
+++ b/etc/config.sh/FFTW
@@ -64,7 +64,7 @@ then
     # it is either located within ThirdParty, or a central installation
     # outside of ThirdParty and must be added to the lib-path.
 
-    ending="${FFTW_ARCH_PATH_PATH##*-}"
+    ending="${FFTW_ARCH_PATH##*-}"
     if [ "$ending" != none -a "$ending" != system ]
     then
         _foamAddLib $FFTW_ARCH_PATH/lib$WM_COMPILER_LIB_ARCH