Revert "[misc] Fix deprecated calls"

This reverts commit 5147251aec545b3bf88450e5c4a63fc2a9678785.