Clean up empty segments when rotating.