fixes to persist for orm