Fixed grouping logic in send