fix in checkConditions method