Fix bug where search results were deleted when returning to a search page