advanced search. Some fixes.