Python 3 fixes
More fixes