fix javascript search