fixed typo in if statement