fixing advanced search