fixing global variables in tests