fixed errors in persistance and aggregator