Fix for global variables