fix py3 bug in previous