Fixed bug which caused missing env variables.