Sorting now works correctly by occurences->lastname->firstname