diff --git a/src/security/validator-null.hpp b/src/security/validator-null.hpp
index 27dc63d..d1d8faa 100644
--- a/src/security/validator-null.hpp
+++ b/src/security/validator-null.hpp
@@ -21,20 +21,20 @@
   
 protected:
   virtual void
-  checkPolicy (const shared_ptr<const Data>& data, 
+  checkPolicy (const Data& data, 
                int stepCount, 
                const OnDataValidated &onValidated, 
                const OnDataValidationFailed &onValidationFailed,
                std::vector<shared_ptr<ValidationRequest> > &nextSteps)
-  { onValidated(data); }
+  { onValidated(data.shared_from_this()); }
   
   virtual void
-  checkPolicy (const shared_ptr<const Interest>& interest, 
+  checkPolicy (const Interest& interest, 
                int stepCount, 
                const OnInterestValidated &onValidated, 
                const OnInterestValidationFailed &onValidationFailed,
                std::vector<shared_ptr<ValidationRequest> > &nextSteps)
-  { onValidated(interest); }
+  { onValidated(interest.shared_from_this()); }
 };
 
 }
diff --git a/src/security/validator-regex.cpp b/src/security/validator-regex.cpp
index 18dc9bf..1b9dcb9 100644
--- a/src/security/validator-regex.cpp
+++ b/src/security/validator-regex.cpp
@@ -75,7 +75,7 @@
 { onValidationFailed(data); }
 
 void
-ValidatorRegex::checkPolicy(const shared_ptr<const Data> &data, 
+ValidatorRegex::checkPolicy(const Data& data, 
                             int stepCount, 
                             const OnDataValidated &onValidated, 
                             const OnDataValidationFailed &onValidationFailed,
@@ -83,25 +83,25 @@
 {
   if(m_stepLimit == stepCount){
     _LOG_DEBUG("reach the maximum steps of verification");
-    onValidationFailed(data);
+    onValidationFailed(data.shared_from_this());
     return;
   }
   
   RuleList::iterator it = m_mustFailVerify.begin();
   for(; it != m_mustFailVerify.end(); it++)
-    if((*it)->satisfy(*data))
+    if((*it)->satisfy(data))
       {
-        onValidationFailed(data);
+        onValidationFailed(data.shared_from_this());
         return;
       }
 
   it = m_verifyPolicies.begin();
   for(; it != m_verifyPolicies.end(); it++)
     {
-      if((*it)->satisfy(*data))
+      if((*it)->satisfy(data))
         {
           try{
-            SignatureSha256WithRsa sig(data->getSignature());                
+            SignatureSha256WithRsa sig(data.getSignature());                
             
             Name keyLocatorName = sig.getKeyLocator().getName();
             shared_ptr<const Certificate> trustedCert;
@@ -111,20 +111,20 @@
               trustedCert = m_trustAnchors[keyLocatorName];
             
             if(static_cast<bool>(trustedCert)){
-              if(verifySignature(*data, sig, trustedCert->getPublicKeyInfo()))
-                onValidated(data);
+              if(verifySignature(data, sig, trustedCert->getPublicKeyInfo()))
+                onValidated(data.shared_from_this());
               else
-                onValidationFailed(data);
+                onValidationFailed(data.shared_from_this());
               
               return;
             }
             else{
               // _LOG_DEBUG("KeyLocator is not trust anchor");                
               OnDataValidated onKeyValidated = bind(&ValidatorRegex::onCertificateValidated, this, 
-                                                    _1, data, onValidated, onValidationFailed);
+                                                    _1, data.shared_from_this(), onValidated, onValidationFailed);
               
               OnDataValidationFailed onKeyValidationFailed = bind(&ValidatorRegex::onCertificateValidationFailed, this, 
-                                                                  _1, data, onValidationFailed);              
+                                                                  _1, data.shared_from_this(), onValidationFailed);              
 
               shared_ptr<ValidationRequest> nextStep = make_shared<ValidationRequest>(Interest(boost::cref(sig.getKeyLocator().getName())), 
                                                                                       onKeyValidated,
@@ -136,17 +136,17 @@
             }
           }catch(SignatureSha256WithRsa::Error &e){
             _LOG_DEBUG("ValidatorRegex Error: " << e.what());
-            onValidationFailed(data);
+            onValidationFailed(data.shared_from_this());
             return;
           }catch(KeyLocator::Error &e){
             _LOG_DEBUG("ValidatorRegex Error: " << e.what());
-            onValidationFailed(data);
+            onValidationFailed(data.shared_from_this());
             return;
           }
         }
     }
 
-  onValidationFailed(data);
+  onValidationFailed(data.shared_from_this());
   return;
 }
 
diff --git a/src/security/validator-regex.hpp b/src/security/validator-regex.hpp
index 6b44d13..d6b9b1d 100644
--- a/src/security/validator-regex.hpp
+++ b/src/security/validator-regex.hpp
@@ -48,19 +48,19 @@
 
 protected:
   virtual void
-  checkPolicy (const shared_ptr<const Data>& data, 
+  checkPolicy (const Data& data, 
                int stepCount, 
                const OnDataValidated &onValidated, 
                const OnDataValidationFailed &onValidationFailed,
                std::vector<shared_ptr<ValidationRequest> > &nextSteps);
 
   virtual void
-  checkPolicy (const shared_ptr<const Interest>& interest, 
+  checkPolicy (const Interest& interest, 
                int stepCount, 
                const OnInterestValidated &onValidated, 
                const OnInterestValidationFailed &onValidationFailed,
                std::vector<shared_ptr<ValidationRequest> > &nextSteps)
-  { onValidationFailed(interest); }
+  { onValidationFailed(interest.shared_from_this()); }
 
   void
   onCertificateValidated(const shared_ptr<const Data> &signCertificate, 
diff --git a/src/security/validator.cpp b/src/security/validator.cpp
index ebb8b55..8b1c17f 100644
--- a/src/security/validator.cpp
+++ b/src/security/validator.cpp
@@ -26,7 +26,7 @@
 {}
 
 void
-Validator::validate(const shared_ptr<const Interest> &interest, 
+Validator::validate(const Interest& interest, 
                     const OnInterestValidated &onValidated, 
                     const OnInterestValidationFailed &onValidationFailed,
                     int stepCount)
@@ -40,7 +40,7 @@
         throw Error("Face should be set prior to verify method to call");
       
       vector<shared_ptr<ValidationRequest> >::const_iterator it = nextSteps.begin();
-      OnFailure onFailure = bind(onValidationFailed, interest);
+      OnFailure onFailure = bind(onValidationFailed, interest.shared_from_this());
       for(; it != nextSteps.end(); it++)
         m_face->expressInterest((*it)->m_interest,
                                 bind(&Validator::onData, this, _1, _2, *it), 
@@ -57,7 +57,7 @@
 }
 
 void
-Validator::validate(const shared_ptr<const Data> &data, 
+Validator::validate(const Data& data, 
                     const OnDataValidated &onValidated, 
                     const OnDataValidationFailed &onValidationFailed,
                     int stepCount)
@@ -71,7 +71,7 @@
         throw Error("Face should be set prior to verify method to call");
 
       vector<shared_ptr<ValidationRequest> >::const_iterator it = nextSteps.begin();
-      OnFailure onFailure = bind(onValidationFailed, data);
+      OnFailure onFailure = bind(onValidationFailed, data.shared_from_this());
       for(; it != nextSteps.end(); it++)
         m_face->expressInterest((*it)->m_interest,
                                 bind(&Validator::onData, this, _1, _2, *it), 
@@ -88,22 +88,22 @@
 }
 
 void
-Validator::onData(const shared_ptr<const Interest> &interest, 
-                  const shared_ptr<const Data> &data, 
-                  shared_ptr<ValidationRequest> nextStep)
+Validator::onData(const Interest& interest, 
+                  Data& data, 
+                  const shared_ptr<ValidationRequest>& nextStep)
 {
   validate(data, nextStep->m_onValidated, nextStep->m_onDataValidated, nextStep->m_stepCount);
 }
 
 void
-Validator::onTimeout(const shared_ptr<const Interest> &interest, 
+Validator::onTimeout(const Interest& interest, 
                      int retry, 
                      const OnFailure &onFailure, 
-                     shared_ptr<ValidationRequest> nextStep)
+                     const shared_ptr<ValidationRequest>& nextStep)
 {
   if (retry > 0)
     // Issue the same expressInterest except decrement retry.
-    m_face->expressInterest(*interest, 
+    m_face->expressInterest(interest, 
                             bind(&Validator::onData, this, _1, _2, nextStep), 
                             bind(&Validator::onTimeout, this, _1, retry - 1, onFailure, nextStep));
   else
diff --git a/src/security/validator.hpp b/src/security/validator.hpp
index 1d74aa2..5a1062d 100644
--- a/src/security/validator.hpp
+++ b/src/security/validator.hpp
@@ -39,7 +39,7 @@
    * @param onValidationFailed If the Data validation fails, this calls onValidationFailed(data).
    */
   void
-  validate (const shared_ptr<const Data> &data, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed)
+  validate (const Data& data, const OnDataValidated &onValidated, const OnDataValidationFailed &onValidationFailed)
   { validate (data, onValidated, onValidationFailed, 0); }
 
   /**
@@ -50,7 +50,7 @@
    * @param onValidationFailed If the Interest validation fails, this calls onValidationFailed(interest).
    */
   void
-  validate (const shared_ptr<const Interest> &interest, const OnInterestValidated &onValidated, const OnInterestValidationFailed &onValidationFailed)
+  validate (const Interest& interest, const OnInterestValidated &onValidated, const OnInterestValidationFailed &onValidationFailed)
   { validate (interest, onValidated, onValidationFailed, 0); }
 
   /*****************************************
@@ -95,7 +95,7 @@
    * @param nextSteps On return, contains the next validation step.
    */
   virtual void
-  checkPolicy (const shared_ptr<const Data> &data, 
+  checkPolicy (const Data& data, 
                int stepCount, 
                const OnDataValidated &onValidated, 
                const OnDataValidationFailed &onValidationFailed,
@@ -114,7 +114,7 @@
    * @return the indication of next validation step, null if there is no further step.
    */
   virtual void
-  checkPolicy (const shared_ptr<const Interest> &interest, 
+  checkPolicy (const Interest& interest, 
                int stepCount, 
                const OnInterestValidated &onValidated, 
                const OnInterestValidationFailed &onValidationFailed,
@@ -125,25 +125,25 @@
   
   /// @brief Process the received certificate.
   void
-  onData (const shared_ptr<const Interest> &interest, 
-          const shared_ptr<const Data> &data, 
-          shared_ptr<ValidationRequest> nextStep);
+  onData (const Interest& interest, 
+          Data& data, 
+          const shared_ptr<ValidationRequest>& nextStep);
   
   /// @brief Re-express the interest if it times out.
   void
-  onTimeout (const shared_ptr<const Interest> &interest, 
+  onTimeout (const Interest& interest, 
              int retry, 
              const OnFailure &onFailure, 
-             shared_ptr<ValidationRequest> nextStep);
+             const shared_ptr<ValidationRequest>& nextStep);
 
   void
-  validate (const shared_ptr<const Data> &data, 
+  validate (const Data& data, 
             const OnDataValidated &onValidated, 
             const OnDataValidationFailed &onValidationFailed, 
             int stepCount);
 
   void
-  validate (const shared_ptr<const Interest> &interest, 
+  validate (const Interest& interest, 
             const OnInterestValidated &onValidated, 
             const OnInterestValidationFailed &onValidationFailed, 
             int stepCount);
