Fix the use of environment variables