Fix exception with unicode keys.