Small modification in JS in search template