fix for py3.x