Bugfix: Aggregate functions