aggregates fixes in code gen
more fixes to aggro code gen
more fixes