more python 3 fixes