Fix exit code on errors.