bugfix for search condition