Fix exit codes for errors