Exit code should now be correct in all cases.