fixes for python3