Fix aggregate results logic