Fixed some errors in the Repair Generator code.