Fix deprecated function.