Fix latest deprecations