fixed issue with malformed UTF-8 string;

Fixed issue with malformed UTF-8 string