Fix some issues related to the search document panel