Fix unbalanced brackets