[WIP]Fix byte handling to work for both Py2 and Py3