Fixed typo in if statements