Fixed some issues saving the persitent data