Index: /trunk/FACT++/src/InterpreterV8.cc
===================================================================
--- /trunk/FACT++/src/InterpreterV8.cc	(revision 15140)
+++ /trunk/FACT++/src/InterpreterV8.cc	(revision 15141)
@@ -330,6 +330,6 @@
         return ThrowException(String::New("Argument 2 not an int32 and not a string."));
 
-    if (args.Length()==3 && !args[2]->IsInt32())
-        return ThrowException(String::New("Argument 3 not an int32."));
+    if (args.Length()==3 && !args[2]->IsInt32() && !args[2]->IsNull())
+        return ThrowException(String::New("Argument 3 not an int32 and not null."));
 
     // Using a Javascript function has the advantage that it is fully
@@ -337,5 +337,5 @@
 
     const string index   = args[1]->IsInt32() ? "s.index" : "s.name";
-    const bool   timeout = args.Length()==3;
+    const bool   timeout = args.Length()==3 && !args[2]->IsNull();
     const string arg0    = *String::AsciiValue(args[0]);
     const string state   = args[1]->IsString() ? *String::AsciiValue(args[1]) : "";
@@ -368,5 +368,5 @@
                    "})('"+arg0+"',"+arg1;
     if (timeout)
-        code +=    "," + to_string(args[2]->Int32Value());
+        code +=    "," + (args[2]->IsNull()?"undefined":to_string(args[2]->Int32Value()));
     code +=        ");";
 
@@ -714,5 +714,5 @@
     }
 
-    return Boolean::New(true);
+    return Undefined();//Boolean::New(true);
 }
 
