Remove trailing brackets.