fixing environment variable access