correcting encoding