fixed bug causing "Aggregate" button not to work