Corrected searching condition.