Fix for hourly/daily/monthly data aggregation.