more PY3 improvements