Fix search form

fixed the search form to narrow down results accordingly, rather than
showing all rows in table.