Fix for grouped data