fixed test for aggregate functions