clean up and persistence correction