Fixed exit code for exceptions with error code 0