Fix 4.0.10 regressions