fixed mongodb persistence bug