Fix global vars