Fixed typo on if statements