wrapper: fixed unicode/bytes issues in Py3k.