Fix unmatched brackets