fix persistence bug