fix bug with search