Remove some 2.11 warnings in a 2.10 compatible way.