diff --git a/src/route/fib.cpp b/src/route/fib.cpp
index 592b2bd..7e19100 100644
--- a/src/route/fib.cpp
+++ b/src/route/fib.cpp
@@ -78,18 +78,6 @@
 void
 Fib::update(const ndn::Name& name, NexthopList& allHops)
 {
-  FibEntry* entry = processUpdate(name, allHops);
-  if (entry != nullptr && !entry->getRefreshEventId()) {
-    scheduleEntryRefresh(*entry,
-                         [this] (FibEntry& fibEntry) {
-                           this->scheduleLoop(fibEntry);
-                         });
-  }
-}
-
-FibEntry*
-Fib::processUpdate(const ndn::Name& name, NexthopList& allHops)
-{
   _LOG_DEBUG("Fib::update called");
 
   // Get the max possible faces which is the minumum of the configuration setting and
@@ -117,7 +105,7 @@
 
     m_table.emplace(name, entry);
 
-    return &m_table.find(name)->second;
+    entryIt = m_table.find(name);
   }
   // Existing FIB entry that may or may not have nextHops
   else {
@@ -127,7 +115,7 @@
     // Remove empty FIB entry
     if (hopsToAdd.getSize() == 0) {
       remove(name);
-      return nullptr;
+      return;
     }
 
     FibEntry& entry = (entryIt->second);
@@ -151,7 +139,14 @@
     // Increment sequence number
     entry.setSeqNo(entry.getSeqNo() + 1);
 
-    return &(m_table.find(name)->second);
+    entryIt = m_table.find(name);
+
+  }
+  if (entryIt != m_table.end() && !entryIt->second.getRefreshEventId()) {
+    scheduleEntryRefresh(entryIt->second,
+                         [this] (FibEntry& entry) {
+                           scheduleLoop(entry);
+                         });
   }
 }
 
diff --git a/src/route/fib.hpp b/src/route/fib.hpp
index 5761a3d..8cf7aa4 100644
--- a/src/route/fib.hpp
+++ b/src/route/fib.hpp
@@ -211,12 +211,6 @@
                        const std::string& message);
 
 PUBLIC_WITH_TESTS_ELSE_PRIVATE:
-  /*! \brief Internal portion of Fib::update.
-   * \sa Fib::update
-   */
-  FibEntry*
-  processUpdate(const ndn::Name& name, NexthopList& allHops);
-
   /*! \brief Schedule a refresh event for an entry.
    *
    * Schedules a refresh event for an entry. In order to form a
diff --git a/tests/test-fib.cpp b/tests/test-fib.cpp
index 993a7a6..84642f1 100644
--- a/tests/test-fib.cpp
+++ b/tests/test-fib.cpp
@@ -19,11 +19,9 @@
  *
  **/
 
+#include "route/fib.hpp"
 #include "test-common.hpp"
 #include "control-commands.hpp"
-
-#include "route/fib.hpp"
-
 #include "adjacency-list.hpp"
 #include "conf-parameter.hpp"
 
@@ -107,7 +105,7 @@
   hops.addNextHop(hop1);
   hops.addNextHop(hop2);
 
-  fib->processUpdate("/ndn/name", hops);
+  fib->update("/ndn/name", hops);
   face->processEvents(ndn::time::milliseconds(-1));
 
   // Should register faces 1 and 2 for /ndn/name
@@ -141,13 +139,13 @@
   oldHops.addNextHop(hop1);
   oldHops.addNextHop(hop2);
 
-  fib->processUpdate("/ndn/name", oldHops);
+  fib->update("/ndn/name", oldHops);
   face->processEvents(ndn::time::milliseconds(-1));
 
   BOOST_REQUIRE_EQUAL(interests.size(), 2);
   interests.clear();
 
-  fib->processUpdate("/ndn/name", oldHops);
+  fib->update("/ndn/name", oldHops);
   face->processEvents(ndn::time::milliseconds(-1));
 
   // Should register face 1 and 2 for /ndn/name
@@ -180,7 +178,7 @@
   oldHops.addNextHop(hop1);
   oldHops.addNextHop(hop2);
 
-  fib->processUpdate("/ndn/name", oldHops);
+  fib->update("/ndn/name", oldHops);
   face->processEvents(ndn::time::milliseconds(-1));
 
   BOOST_REQUIRE_EQUAL(interests.size(), 2);
@@ -188,7 +186,7 @@
 
   NexthopList empty;
 
-  fib->processUpdate("/ndn/name", empty);
+  fib->update("/ndn/name", empty);
   face->processEvents(ndn::time::milliseconds(-1));
 
   // Should unregister faces 1 and 2 for /ndn/name
@@ -223,7 +221,7 @@
   hops.addNextHop(hop2);
   hops.addNextHop(hop3);
 
-  fib->processUpdate("/ndn/name", hops);
+  fib->update("/ndn/name", hops);
   face->processEvents(ndn::time::milliseconds(-1));
 
   // Should only register faces 1 and 2 for /ndn/name
@@ -256,7 +254,7 @@
   hops.addNextHop(hop1);
   hops.addNextHop(hop2);
 
-  fib->processUpdate("/ndn/name", hops);
+  fib->update("/ndn/name", hops);
   face->processEvents(ndn::time::milliseconds(-1));
 
   // FIB
@@ -269,7 +267,7 @@
   NextHop hop3(router3FaceUri, 5);
   hops.addNextHop(hop3);
 
-  fib->processUpdate("/ndn/name", hops);
+  fib->update("/ndn/name", hops);
   face->processEvents(ndn::time::milliseconds(-1));
 
   // To maintain a max 2 face requirement, face 3 should be registered and face 2 should be
