Fix bytes/str issue in Python 3.x.