Fixed bug in test for environment variable