Hooks should be called within CreateReplica instead of in Map.