Fixing global variables