Correction of errors found during generation