Fix a problem in py3 for the tests