Fix handling for syntax errors