Fix imports on aggregates analysis