Fix UnicodeEncodeError in the model