Balance delimiters automatically