logic typo fix