diff --git a/src/sbbs3/js_global.c b/src/sbbs3/js_global.c
index ec66f2bff5b4669957a7ef7ddead206679e092cc..c373d69117275b5718720cfe3daa9eb60e7ed443 100644
--- a/src/sbbs3/js_global.c
+++ b/src/sbbs3/js_global.c
@@ -3688,7 +3688,7 @@ JSObject* DLLCALL js_CreateGlobalObject(JSContext* cx, scfg_t* cfg, jsSyncMethod
 	p->methods = methods;
 	p->startup = startup;
 
-	if((glob = JS_NewGlobalObject(cx, &js_global_class)) ==NULL)
+	if((glob = JS_NewCompartmentAndGlobalObject(cx, &js_global_class, NULL)) ==NULL)
 		return(NULL);
 
 	if(!JS_SetPrivate(cx, glob, p))	/* Store a pointer to scfg_t and the new methods */