fix error since groups diff order than data

temp fix; will need to work through later