fix exit code