Fix deprecations resulting from commit b114fff5a70293482940f4c2e427d49254376a00.