Fixed a small bug in search