Better handling of syntax errors