More fixes for Python 3.