Fix py3 test failures