Fix unicode compatibilty for models when using Python 2