make sure global variables are cleared