generation error correction