Fixed a bug where the global variables were looked for in the local environment and vice versa