Repair logic and add tests