fix for groupby