Fix typo in if statement