Fixed environment variable getting/setting