Properly encoding exit code.