Bracket matching fixes