updated the algorithm of the ContinuousIntervalDataSeries to fill 0s only if it is not the last value