Merge "Fix a few Python 3.x issues"