Fix for group sorting.