fixing delete search functionality