persisting data is buggy