diff --git a/include/usearch/index.hpp b/include/usearch/index.hpp index 05f55f01c..df1e5f12b 100644 --- a/include/usearch/index.hpp +++ b/include/usearch/index.hpp @@ -2987,7 +2987,8 @@ class index_gt { } form_reverse_links_(metric, updated_slot, closest_view, value, level, context); } - updated_node.key(key); + if (static_cast(updated_node.key()) != key) + updated_node.key(key); // Normalize stats result.computed_distances = context.computed_distances - result.computed_distances;