More Python3 porting fixes.