fixed syntax error in if statement