       false -> notify_up_set(set, set, MapSet.put(old_up, n), callback)
     end
   end
+  defp notify_up_set(old, merged, up, [], callback) do
+    notify_up_set(old, merged, up, callback)
+  end
+  defp notify_up_set(old, merged, up, [n], callback) do
+    notify_up_set(old, merged, MapSet.put(up, n), callback)
+  end
 
   defp notify_up_set(old_set, merged_set, old_up, callback) do
     new_up = MapSet.difference(MapSet.new(merged_set), MapSet.new(old_set))

          delete(ring.node_set, {node(), ring.counter + 1}, n)
        {ring, _} =
         update_ring(%GenServerring{ring | up_set: new_up_set},
           %{node_set: new_node_set, payload: ring.payload, from_node: []})
        {:noreply, ring}
    end
  end

  end
  def handle_info({:nodedown, n}, %GenServerring{up_set: up_set} = ring) do
    new_up_set =
      case MapSet.member?(up_set, n) do
        true ->
          set = MapSet.delete(up_set, n)
          ring.callback.handle_ring_change(MapSet.to_list(set))
