more fixes to python3 syntax errors