Fix problem with environment variables