Fix bug with search