Repair the returncode