fix group by