fix environment load issue for tests