     up_set = notify_up_set(get_set(ring.node_set), get_set(merged_node_set),
     MapSet.to_list(ring.up_set) ++ changes.from_node)
     notify_node_set(ring.node_set, merged_node_set, changes.node_set)
-    notify_payload(value(ring.payload), value(changes.payload), changes)
-
-    gen_ring(merged_node_set, up_set, merged_payload, updated_counter,
-      ring.callback)
+
+    ring =
+      gen_ring(merged_node_set, up_set, merged_payload, updated_counter,
+        ring.callback)
+    notify_payload(value(ring.payload), value(changes.payload), ring)
+    ring
   end
 
   defp update_counter(merged_node_set, merged_payload, old_ring) do

    case ring.up_set |> MapSet.delete(node()) |> MapSet.to_list do
      [] -> {:noreply,ring}
      active_nodes ->
        random_node =
          Enum.at(active_nodes, :random.uniform(length(active_nodes)) - 1)
        :gen_server.cast({__MODULE__, random_node},
          {:reconcile, %{node_set: node_set, payload: ring.payload, from_node: [node()]}})
      {:noreply, ring}
    end

  defp merge(nil, crdt), do: crdt
  defp merge(crdt, crdt), do: crdt
  defp merge(crdt1, crdt2), do: Crdtex.merge(crdt1, crdt2)
end

defmodule GenServerring.App do
  use Application

  def start(type, []) do
    name = Application.get_env(:gen_serverring, :name, :demo_ring)
    callback = Application.get_env(:gen_serverring, :callback, Demo)
    start(type, [{name, callback}])
  end
  def start(_type, args) do
    Supervisor.start_link(GenServerring.App.Sup, args)
  end

  defmodule Sup do
    use Supervisor
    def init(arg) do
      children =
        [worker(:gen_event, [{:local, GenServerring.Events}], id: GenServerring.Events),
         worker(GenServerring, arg)]
      supervise(children, strategy: :one_for_one)
    end
  end
end
