Updates for R17 deprecation compatibility