Fix mistakenly swallowed exception.
Fix compilation error (typo).
Fix crash in env destructor.