Replace some function callings from deprecated to new function name.

Replace some function callings from deprecated to new function name.