Fix a couple oopses on Python 3.