Fix search funtionality.