diff --git a/src/lsdb.cpp b/src/lsdb.cpp
index 1e3cf1b..d5ddd12 100644
--- a/src/lsdb.cpp
+++ b/src/lsdb.cpp
@@ -211,8 +211,8 @@
     if (nlsa.getOrigRouter() != m_confParam.getRouterPrefix()) {
       // If this name LSA is from another router, add the advertised
       // prefixes to the NPT.
-      m_namePrefixTable.addEntry(nlsa.getOrigRouter(),
-                                           nlsa.getOrigRouter());
+      m_namePrefixTable.addEntry(nlsa.getOrigRouter(), nlsa.getOrigRouter());
+
       for (const auto& name : nlsa.getNpl().getNames()) {
         if (name != m_confParam.getRouterPrefix()) {
           m_namePrefixTable.addEntry(name, nlsa.getOrigRouter());
@@ -523,6 +523,10 @@
 void
 Lsdb::writeCorLsdbLog()
 {
+  if (m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_OFF) {
+    return;
+  }
+
   NLSR_LOG_DEBUG("---------------Cor LSDB-------------------");
   for (const auto& corLsa : m_corLsdb) {
     corLsa.writeLog();
@@ -558,12 +562,14 @@
     return;
   }
 
-  if (m_isBuildAdjLsaSheduled == false) {
+  if (m_isBuildAdjLsaSheduled) {
+    NLSR_LOG_DEBUG("Rescheduling Adjacency LSA build in " << m_adjLsaBuildInterval);
+  }
+  else {
     NLSR_LOG_DEBUG("Scheduling Adjacency LSA build in " << m_adjLsaBuildInterval);
-
-    m_scheduler.schedule(m_adjLsaBuildInterval, [this] { buildAdjLsa(); });
     m_isBuildAdjLsaSheduled = true;
   }
+  m_scheduledAdjLsaBuild = m_scheduler.schedule(m_adjLsaBuildInterval, [this] { buildAdjLsa(); });
 }
 
 void
@@ -608,9 +614,9 @@
   // hopefully finished)
   else {
     m_isBuildAdjLsaSheduled = true;
-    int schedulingTime = m_confParam.getInterestRetryNumber() *
-                         m_confParam.getInterestResendTime();
-    m_scheduler.schedule(ndn::time::seconds(schedulingTime), [this] { buildAdjLsa(); });
+    auto schedulingTime = ndn::time::seconds(m_confParam.getInterestRetryNumber() *
+                                             m_confParam.getInterestResendTime());
+    m_scheduledAdjLsaBuild = m_scheduler.schedule(schedulingTime, [this] { buildAdjLsa(); });
   }
 }
 
@@ -1264,6 +1270,10 @@
 void
 Lsdb::writeAdjLsdbLog()
 {
+  if (m_confParam.getHyperbolicState() == HYPERBOLIC_STATE_ON) {
+    return;
+  }
+
   NLSR_LOG_DEBUG("---------------Adj LSDB-------------------");
   for (const auto& adj : m_adjLsdb) {
     adj.writeLog();
