Fixes Py3 errors