Fixed bug with search