Fix environment for tests