Fixed bugs in nodeAgg.c