fixes a few new python 3 problems
Merge branch 'python3' into burnpanck