Added some resets to the globals.