fix global variables