fix Unicode issues on Python 2