[misc] Fix deprecated call

(cherry picked from commit a3abe68e4d2eee737773c0e15348bbd9b7253436)