Fix binary/string issue affecting Python 3.x