fix sorting of group flag checkboxes