Bugfix in search functionality