Fixed model persistence bug