Repair failed tests