persistence bug fixes