py2/3 fixes.
more tests.