fix tests/crash on python 3