Exit status handling was completely wrong.