resolved bug when determining the number of conditions.