More changes on the way to python3 compatibility (but not enough)