Sorting of group now works fine