Fix deprecated search method