Improving handling of missing curly braces