fix search conditions bug