fixed error in path construction in group()