More fixes for python3