Fix python3 test failures