bug fix + aggregation filter