Optimized error correction.