Fix bug in persistence manager