Fix more bugs with advanced search criteria.