Fixed invalid brace matching