Fixed global variables accidently created  in tests.