env variable tests not resetting properly