Fixes to advanced search.