Added extra conditional in search.erb