Fixing exit codes