more py3 fixes