diff --git a/src/dht.cpp b/src/dht.cpp
index 7ae0bc424f9f844a01301e759b450f4fee69b4f7..982a089adafdb73dab6d5c52b4f8aa3173ef4458 100644
--- a/src/dht.cpp
+++ b/src/dht.cpp
@@ -841,7 +841,7 @@ Dht::searchStep(std::shared_ptr<Search> sr)
                     continue;
                 }
             }
-            if (in) storageStore(sr->id, a.value, a.created);
+
             unsigned i = 0;
             for (auto& n : sr->nodes) {
                 if (not n.isSynced(now))
@@ -1244,6 +1244,8 @@ Dht::announce(const InfoHash& id, sa_family_t af, std::shared_ptr<Value> value,
         return;
     }
 
+    storageStore(id, value, created);
+
     auto& srs = af == AF_INET ? searches4 : searches6;
     auto srp = srs.find(id);
     auto sr = srp == srs.end() ? search(id, af, nullptr, nullptr) : srp->second;