logic typo