We have to differenciate aggregate functions with others.

@whachoe did the modification from sterrien cause you troubles?