bugfix for py3