Fix search

Sorry for a flawed pull request earlier - the admin would break if someone tried to manually add `?q=whatever` to the url.  Also, the query would be lost on page or sort change. This is the fix.