Improved error correction, when invalid data parsed