fixed encoding issue with getting dictionary