more fixes for py3