Fixed small logic typo