fixed union
diff --git a/theta/include/theta_union_base_impl.hpp b/theta/include/theta_union_base_impl.hpp
index ec8ce56..254bc44 100644
--- a/theta/include/theta_union_base_impl.hpp
+++ b/theta/include/theta_union_base_impl.hpp
@@ -43,7 +43,7 @@
   if (sketch.get_theta64() < union_theta_) union_theta_ = sketch.get_theta64();
   for (auto& entry: sketch) {
     const uint64_t hash = EK()(entry);
-    if (hash < union_theta_) {
+    if (hash < union_theta_ && hash < table_.theta_) {
       auto result = table_.find(hash);
       if (!result.second) {
         table_.insert(result.first, conditional_forward<SS>(entry));