more fixes for Python2-3