Fix bug with searches not working