Fixed a couple PY3K incompatibilities.