Fixed a Python 2.x compatibility issue.