encode_utf16le method fix