more minor Python 3 fixes