fixing exit codes