Index: trunk/FACT++/src/InterpreterV8.cc
===================================================================
--- trunk/FACT++/src/InterpreterV8.cc	(revision 16981)
+++ trunk/FACT++/src/InterpreterV8.cc	(revision 16985)
@@ -228,4 +228,6 @@
     if (!HandleException(exception, "thread"))
         V8::TerminateExecution(fThreadId);
+
+    func->CreationContext()->Exit();
 }
 
@@ -1456,6 +1458,4 @@
     Handle<Object> obj = it->second;
 
-    obj->CreationContext()->Enter();
-
     const Handle<String> onchange = String::New("onchange");
     if (!obj->Has(onchange))
@@ -1466,4 +1466,6 @@
         return;
 
+    obj->CreationContext()->Enter();
+
     // -------------------------------------------------------------------
 
@@ -1487,4 +1489,6 @@
         V8::TerminateExecution(fThreadId);
     }
+
+    obj->CreationContext()->Exit();
 }
 
@@ -1556,4 +1560,6 @@
     if (!HandleException(exception, "dim.onchange"))
         V8::TerminateExecution(fThreadId);
+
+    it->second->CreationContext()->Exit();
 }
 
@@ -1637,4 +1643,6 @@
     if (!HandleException(exception, "interrupt"))
         V8::TerminateExecution(fThreadId);
+
+    fInterruptCallback->CreationContext()->Exit();
 
     return rc<10 || rc>255 ? -42 : rc;
