Fixed a but with globalVars