Fix global variables