diff --git a/.waf-tools/websocket.py b/.waf-tools/websocket.py
index b2a57aa..febad4e 100644
--- a/.waf-tools/websocket.py
+++ b/.waf-tools/websocket.py
@@ -18,7 +18,7 @@
 
     isMandatory = kw.get('mandatory', True)
 
-    self.start_msg('Checking for Websocket includes')
+    self.start_msg('Checking for WebSocket includes')
 
     try:
         websocketDir = self.path.find_dir('websocketpp/websocketpp')
@@ -27,12 +27,12 @@
 
         versionFile = websocketDir.find_node('version.hpp')
         if not websocketDir:
-            raise Errors.WafError('Corrupted: Websocket version file not found')
+            raise Errors.WafError('Corrupted: WebSocket version file not found')
 
         try:
             txt = versionFile.read()
         except (OSError, IOError):
-            raise Errors.WafError('Corrupted: cannot read Websocket version file')
+            raise Errors.WafError('Corrupted: cannot read WebSocket version file')
 
         # Looking for the following:
         # static int const major_version = 0;
@@ -71,9 +71,9 @@
             Logs.warn('    git submodule init && git submodule update')
             Logs.warn('Otherwise, manually download and extract websocketpp library:')
             Logs.warn('    mkdir websocketpp')
-            Logs.warn('    curl -L -O https://github.com/zaphoyd/websocketpp/archive/0.3.0-alpha4.tar.gz')
-            Logs.warn('    tar zxf 0.3.0-alpha4.tar.gz -C websocketpp/ --strip 1')
-            Logs.warn('Alternatively, Websocket support can be disabled with --without-websocket')
+            Logs.warn('    curl -L https://github.com/zaphoyd/websocketpp/tarball/65cc3765a892ee5928160ba478178e747233aa6c > websocket.tar.gz')
+            Logs.warn('    tar zxf websocket.tar.gz -C websocketpp/ --strip 1')
+            Logs.warn('Alternatively, WebSocket support can be disabled with --without-websocket')
             self.fatal("The configuration failed")
         else:
             self.end_msg(str(error))
diff --git a/rib/rib-manager.cpp b/rib/rib-manager.cpp
index d2e80c3..993d84b 100644
--- a/rib/rib-manager.cpp
+++ b/rib/rib-manager.cpp
@@ -220,11 +220,6 @@
           return;
         }
 
-      if (!parameters.hasFaceId() || parameters.getFaceId() == 0)
-        {
-          parameters.setFaceId(request->getIncomingFaceId());
-        }
-
       NFD_LOG_DEBUG("command result: processing verb: " << verb);
       (verbProcessor->second)(this, request, parameters);
     }
@@ -250,6 +245,11 @@
       return;
     }
 
+  if (!parameters.hasFaceId() || parameters.getFaceId() == 0)
+    {
+      parameters.setFaceId(request->getIncomingFaceId());
+    }
+
   FaceEntry faceEntry;
   faceEntry.faceId = parameters.getFaceId();
   faceEntry.origin = parameters.getOrigin();
@@ -306,6 +306,11 @@
       return;
     }
 
+  if (!parameters.hasFaceId() || parameters.getFaceId() == 0)
+    {
+      parameters.setFaceId(request->getIncomingFaceId());
+    }
+
   FaceEntry faceEntry;
   faceEntry.faceId = parameters.getFaceId();
   faceEntry.origin = parameters.getOrigin();
