Fix to remove deleted thread from search