Py3.1 compatibility