Improved support for syntax errors