fixed bug in syntax error messages reporting