Fixed persistency error in database return