fixing typo in if statement