fixed a bug in advanced search