Fixed the js errors in search file