more python3 regression fixes