Fix typo in if condition