bug fix in PeMSAggregateDatum