small changes to global vars.