fixed missed logic