fixed bug in group function