Fix global environment setter