Fixed a Python 3 regression.