updated syntax error checks