other Python3 fixes