Fixed bug in search