fix filterBySearch function