Fixed decoding of exit code