More Python3 fixes