Fix logic typo