Hopefully avoid bugs from changes in Python 3