Fixed issues with GLOBALS