diff --git a/etc/settings.csh b/etc/settings.csh
index 3ebb1939f81461969993c7599533340f89bdea0b..7d70db96af172f66de70958a49896857d8ecb2c0 100644
--- a/etc/settings.csh
+++ b/etc/settings.csh
@@ -94,7 +94,7 @@ then
     foamCompiler=system
     echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:"
     echo "    foamCompiler not set, using '$foamCompiler'"
-fi
+endif
 
 switch ("$foamCompiler")
 case OpenFOAM: