diff --git a/src/sync-socket.cc b/src/sync-socket.cc
index f5e378f..b18f64c 100644
--- a/src/sync-socket.cc
+++ b/src/sync-socket.cc
@@ -37,11 +37,11 @@
                         const Name& dataPrefix,
                         uint64_t dataSession,
                         bool withRoutingPrefix,
-                        const Name& routingPrefix, 
+                        const Name& routingPrefix,
                         shared_ptr<Face> face,
                         const IdentityCertificate& myCertificate,
                         shared_ptr<SecRuleRelative> dataRule,
-                        NewDataCallback dataCallback, 
+                        NewDataCallback dataCallback,
                         RemoveCallback rmCallback )
   : m_dataPrefix(dataPrefix)
   , m_dataSession(dataSession)
@@ -61,9 +61,9 @@
   if(static_cast<bool>(dataRule))
     {
       m_withSecurity = true;
-      m_syncValidator = shared_ptr<Validator>(new SyncValidator(syncPrefix, 
-                                                                m_myCertificate, 
-                                                                m_face, 
+      m_syncValidator = shared_ptr<Validator>(new SyncValidator(syncPrefix,
+                                                                m_myCertificate,
+                                                                *m_face,
                                                                 bind(&SyncSocket::publishData, this, _1, _2, _3, true),
                                                                 dataRule));
     }
@@ -73,7 +73,7 @@
       m_syncValidator = shared_ptr<Validator>(new ValidatorNull());
     }
 
-  
+
   m_syncLogic = shared_ptr<SyncLogic>(new SyncLogic(syncPrefix,
                                                     myCertificate,
                                                     m_syncValidator,
@@ -93,7 +93,7 @@
   data->setContent(reinterpret_cast<const uint8_t*>(buf), len);
   data->setFreshnessPeriod(time::milliseconds(1000*freshness));
 
-  m_ioService->post(bind(&SyncSocket::publishDataInternal, this, 
+  m_ioService->post(bind(&SyncSocket::publishDataInternal, this,
                          data, isCert));
 }
 
@@ -136,7 +136,7 @@
   m_syncLogic->addLocalNames (dataPrefix, m_dataSession, sequence); // If DNS works, we should use pure m_dataprefix rather than the one with routing prefix.
 }
 
-void 
+void
 SyncSocket::fetchData(const Name& prefix, const SeqNo& seq, const OnDataValidated& dataCallback, int retry)
 {
   Name interestName = prefix;
@@ -145,8 +145,8 @@
   ndn::Interest interest(interestName);
   interest.setMustBeFresh(true);
 
-  m_face->expressInterest(interest, 
-                          bind(&SyncSocket::onData, this, _1, _2, dataCallback), 
+  m_face->expressInterest(interest,
+                          bind(&SyncSocket::onData, this, _1, _2, dataCallback),
                           bind(&SyncSocket::onDataTimeout, this, _1, retry, dataCallback));
 
 }
@@ -198,12 +198,12 @@
                                    _1,
                                    _2,
                                    dataCallback),
-                              bind(&SyncSocket::onDataTimeout, 
+                              bind(&SyncSocket::onDataTimeout,
                                    this,
                                    _1,
                                    retry - 1,
                                    dataCallback));
-                              
+
     }
   else
     _LOG_DEBUG("interest eventually time out!");
@@ -214,10 +214,10 @@
                             size_t interestNameSize,
                             const OnDataValidated& onValidated)
 {
-  if(data->getName().size() > interestNameSize 
+  if(data->getName().size() > interestNameSize
      && data->getName().get(interestNameSize).toEscapedString() == "INTRO-CERT")
     {
-      if(!m_withSecurity) 
+      if(!m_withSecurity)
         return;
 
       Data rawData;
