fixed bugs in search bar