Fixes exit code handling.