closed #4783. replace deprecated function call