ensure all global vars are removed