Minor fixes for python3