It's not entirely clear to me what these ``repair_*`` functions are meant to accomplish.  Perhaps some documentation would help