sum(sum(...)) bug fixed