Fixed environment variables

Thanks to @apb2006
See #1