Fix some js bug with search view.