fixed error using old legacy env variables