diff --git a/wmake/wmakeScheduler b/wmake/wmakeScheduler
index be5f4ba58bb3e7e273e20792f697833f79291b1a..bfff68053a9da4e1cd2ea0b4f4f58f908a3b5a33 100755
--- a/wmake/wmakeScheduler
+++ b/wmake/wmakeScheduler
@@ -184,14 +184,14 @@ do
                     # Set colour
                     colour="${colourList[$colourIndex]}"
 
-                    if [ "$host" = "$HOST" ]; then
+                    if [ "$host" = "$HOSTNAME" ]; then
                         eval $* 2>&1 | colourPipe "$colour"
                     else
                         ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" 2>&1 | colourPipe "$colour"
                     fi
                     retval=$?
                 else
-                    if [ "$host" = "$HOST" ]; then
+                    if [ "$host" = "$HOSTNAME" ]; then
                         eval $* 2>&1
                     else
                         ssh $host "$sourceFoam 2>/dev/null; cd $PWD && $rcmd" 2>&1