Fix bug with Search Functionality