fix parsing issue with nested braces