fix javascript so lower and upper search bar work