diff --git a/daemon/table/strategy-choice.cpp b/daemon/table/strategy-choice.cpp
index 06acaae..b251a97 100644
--- a/daemon/table/strategy-choice.cpp
+++ b/daemon/table/strategy-choice.cpp
@@ -57,7 +57,7 @@
 {
   auto entry = make_unique<Entry>(Name());
   entry->setStrategy(Strategy::create(strategyName, m_forwarder));
-  NFD_LOG_INFO("setDefaultStrategy " << entry->getStrategyName());
+  NFD_LOG_INFO("setDefaultStrategy " << entry->getStrategyInstanceName());
 
   // don't use .insert here, because it will invoke findEffectiveStrategy
   // which expects an existing root entry
@@ -86,7 +86,7 @@
   /// m_strategyInstances, install, getStrategy, hasStrategy should be eliminated.
 
   BOOST_ASSERT(strategy != nullptr);
-  Name strategyName = strategy->getName();
+  Name strategyName = strategy->getInstanceName();
   // copying Name, so that strategyName remains available even if strategy is deallocated
 
   bool isInserted = false;
@@ -142,13 +142,13 @@
   Entry* entry = nte.getStrategyChoiceEntry();
   Strategy* oldStrategy = nullptr;
   if (entry != nullptr) {
-    if (entry->getStrategyName() == strategy->getName()) {
-      NFD_LOG_TRACE("insert(" << prefix << ") not changing " << strategy->getName());
+    if (entry->getStrategyInstanceName() == strategy->getInstanceName()) {
+      NFD_LOG_TRACE("insert(" << prefix << ") not changing " << strategy->getInstanceName());
       return true;
     }
     oldStrategy = &entry->getStrategy();
-    NFD_LOG_TRACE("insert(" << prefix << ") changing from " << oldStrategy->getName() <<
-                  " to " << strategy->getName());
+    NFD_LOG_TRACE("insert(" << prefix << ") changing from " << oldStrategy->getInstanceName() <<
+                  " to " << strategy->getInstanceName());
   }
   else {
     oldStrategy = &this->findEffectiveStrategy(prefix);
@@ -156,7 +156,7 @@
     entry = newEntry.get();
     nte.setStrategyChoiceEntry(std::move(newEntry));
     ++m_nItems;
-    NFD_LOG_TRACE("insert(" << prefix << ") new entry " << strategy->getName());
+    NFD_LOG_TRACE("insert(" << prefix << ") new entry " << strategy->getInstanceName());
   }
 
   this->changeStrategy(*entry, *oldStrategy, *strategy);
@@ -207,7 +207,7 @@
     return {false, Name()};
   }
 
-  return {true, entry->getStrategy().getName()};
+  return {true, entry->getStrategyInstanceName()};
 }
 
 template<typename K>
@@ -265,8 +265,8 @@
   }
 
   NFD_LOG_INFO("changeStrategy(" << entry.getPrefix() << ")"
-               << " from " << oldStrategy.getName()
-               << " to " << newStrategy.getName());
+               << " from " << oldStrategy.getInstanceName()
+               << " to " << newStrategy.getInstanceName());
 
   // reset StrategyInfo on a portion of NameTree,
   // where entry's effective strategy is covered by the changing StrategyChoice entry
