fixed bug where there was only datapoint in period and interval could not be computed