Fix Py3k compatibility issue