fix conditiong