issue solved for no group returned when there's multiple empty groups