Fix tests with all Python versions
Fix test failures