more fixes for python3