Fixed "object references an unsaved transient instance" issue.