Fix bugs on search page