Fixed group data not being copied and added additional check before copying