fix py3 issues