fixed bug when an interval results in empty data.