py3 corrections