Fixed issue with environment variables