Fix 2.0 deprecations