Fix "Syntax error at 'if'; expected '}'". #222