Fix problem with aggregation of the time field