fix syntax error in if