Fix bug that only selects one group to be shown in a table