Fix search JS. Closes #1.