Correct issues with encoding.