Changed a couple lines to from globalScope to currentScope