fix error with encoding.