Fix problem with environment vars