diff --git a/compiler/natives/os/os.go b/compiler/natives/os/os.go
index <HASH>..<HASH> 100644
--- a/compiler/natives/os/os.go
+++ b/compiler/natives/os/os.go
@@ -11,13 +11,14 @@ func runtime_args() []string { // not called on Windows
 }
 
 func init() {
-	process := js.Global.Get("process")
-	if process == js.Undefined {
-		Args = []string{"?"}
+	if process := js.Global.Get("process"); process != js.Undefined {
+		argv := process.Get("argv")
+		Args = make([]string, argv.Length()-1)
+		for i := 0; i < argv.Length()-1; i++ {
+			Args[i] = argv.Index(i + 1).Str()
+		}
 	}
-	argv := process.Get("argv")
-	Args = make([]string, argv.Length()-1)
-	for i := 0; i < argv.Length()-1; i++ {
-		Args[i] = argv.Index(i + 1).Str()
+	if len(Args) == 0 {
+		Args = []string{"?"}
 	}
 }
make sure that os.Args[0] is always set