fix to GroupBy
fix test for GroupBy