fix orderby on groups