#519 Added syntax error check