repair_terms function

Repair Terms