#1 added restore advanced search fields after search, fixed flags filter