diff --git a/src/main.ts b/src/main.ts
index 244aa291f45785c4d02ad8f67dedb5a493cf7d43..c923822f9a8e5d9bba0fd8b1dfd5644ead39f8d2 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -348,6 +348,7 @@ async function createIdentities(ctx: ProcessorContext<StoreWithCache>, newData:
     let newI = new Identity({
       id: String(i.index),
       index: i.index,
+      name: i.id, // identities created but not confirmed have no name, we use the id of the creation event
       account,
     });
     data.identities.set(i.index, newI);
@@ -365,7 +366,7 @@ async function confirmIdentities(ctx: ProcessorContext<StoreWithCache>, newData:
 async function changeIdtyOwnerKey(ctx: ProcessorContext<StoreWithCache>, newData: NewData, data: PreparedData) {
   for (let icok of newData.idtyChangedOwnerKey) {
     let idty = await ctx.store.getOrFail(Identity, String(icok.index));
-    let account = await ctx.store.getOrFail(Account, icok.account);
+    let account = data.accounts.get(icok.account) ?? (await ctx.store.getOrFail(Account, icok.account));
     idty.account = account;
     data.identities.set(idty.index, idty);
   }