Fix typo for if statement