fix the global variables