Fixing the declaration of globals