Fixing deprecations