Patched things for Python 3 support.