Remove trailing dividers.