Fixed global variables in tests