fix py3.2 compatibility