diff --git a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ContextSystemFunctionFactory.java b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ContextSystemFunctionFactory.java
index deadd57df864b73f79ce94d1bf99f0408866c864..04e10d09b65713f66a481796d8163333d4818762 100644
--- a/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ContextSystemFunctionFactory.java
+++ b/com.oracle.truffle.r.nodes.builtin/src/com/oracle/truffle/r/nodes/builtin/base/system/ContextSystemFunctionFactory.java
@@ -103,7 +103,12 @@ public class ContextSystemFunctionFactory extends SystemFunctionFactory {
     private static String[] checkRCommand(String command) {
         String[] parts = command.split(" ");
         String rcommand = isFastR(parts[0]);
-        return rcommand == null ? null : parts;
+        if (rcommand == null) {
+            return null;
+        } else {
+            parts[0] = rcommand;
+            return parts;
+        }
 
     }