fix unicode bug in Python 3