fix py3 handling

cleanup