refs #333, #2157
finished check and repair functions