Fixes exit codes