fixed a bug with search.js