fixed persistence bug, finished