             :ets.delete_object(key_ets, current)
             register_key(:unique, pid_server, key_ets, key, entry)
           end
+
         [] ->
           register_key(:unique, pid_server, key_ets, key, entry)
       end

    # is to write the table information alongside the registry info.
    if partitions == 1 do
      entries =
        [{@key_info, {kind, partitions, key_ets}},
         {@all_info, {kind, partitions, key_ets, {self(), pid_ets}, listeners}}]
      true = :ets.insert(registry, entries)
    else
      true = :ets.insert(registry, {i, key_ets, {self(), pid_ets}})

      :ok
    catch
      :error, :badarg ->
        raise ArgumentError, "unknown registry: #{inspect(registry)}"
    end
  end

