Fixes crash if there are no items in a group