Fix 3.11 tests

#5550