How to do an error correction