Fixed calculation of empty datapoints.