Fixes for ST3

Fixes for Python 3.x (ST3).