second try at fixing group by bug