Fix UnicodeEncodeError when converting Update to dict