Fix deprecated call
(cherry picked from commit ac6ba5d6ed401711cc5c22ebe826c618b07d42b3)