sorted bug in advanced search