-fixed some of the crashing when cancelling a search.