Fixing small bug in planitemgroup getitemgroups