Revert "Fix deprecated method"

This reverts commit 8c8428965a1082dceb965e5a38277c1cdee20d6b.