Fix TypeError in Py3k.