Fix for embedDocsNew.
Updated for migration.