global vars fix