Fix error message while searching