Missing check in setGlobalVariable(...)