fix anomaly persistance logic