Fixing R17 deprecations