fix dict's encoding