fix #2 for py3