fix the malFormedByteSequenceException bug