Revert "Fix deprecated code"

This reverts commit 1f76aaf1a2b22de1eddec8709601a5537be5cdc8.