Correct automatic closing of brackets.