fixes the  global variable