more python3 fixes

Here's another batch of python3 fixes.