Fixed bug with the search hanging.