Fix a bug with respect to Python 3 bytes/strings