Fix repair_test