#31 fix problems with encoding in Python 3