Fix more issues in advanced search