Fixing the document migrator