Fixed the history dormitory and search bug.