Corrected exit status handling.