Fixes the breakages in 2.10

Caveat: this means we drop support for 2.8.