diff --git a/src/encoding/der/der.cpp b/src/encoding/der/der.cpp
index fc31161..94578b4 100644
--- a/src/encoding/der/der.cpp
+++ b/src/encoding/der/der.cpp
@@ -15,7 +15,6 @@
 INIT_LOGGER("ndn.der.DER");
 
 using namespace std;
-using namespace ndn::ptr_lib;
 
 namespace ndn {
 
@@ -132,7 +131,7 @@
   }
 }
 
-shared_ptr<DerNode>
+ptr_lib::shared_ptr<DerNode>
 DerNode::parse(InputIterator& start)
 {
   int type = ((uint8_t)start.PeekU8());
@@ -140,23 +139,23 @@
   // _LOG_DEBUG("Type: " << hex << setw(2) << setfill('0') << type);
   switch(type) {
     case DER_BOOLEAN:
-      return shared_ptr<DerBool>(new DerBool(start));
+      return ptr_lib::shared_ptr<DerBool>(new DerBool(start));
     case DER_INTEGER:
-      return shared_ptr<DerInteger>(new DerInteger(start));
+      return ptr_lib::shared_ptr<DerInteger>(new DerInteger(start));
     case DER_BIT_STRING:
-      return shared_ptr<DerBitString>(new DerBitString(start));
+      return ptr_lib::shared_ptr<DerBitString>(new DerBitString(start));
     case DER_OCTET_STRING:
-      return shared_ptr<DerOctetString>(new DerOctetString(start));
+      return ptr_lib::shared_ptr<DerOctetString>(new DerOctetString(start));
     case DER_NULL:
-      return shared_ptr<DerNull>(new DerNull(start));
+      return ptr_lib::shared_ptr<DerNull>(new DerNull(start));
     case DER_OBJECT_IDENTIFIER:
-      return shared_ptr<DerOid>(new DerOid(start));
+      return ptr_lib::shared_ptr<DerOid>(new DerOid(start));
     case DER_SEQUENCE:
-      return shared_ptr<DerSequence>(new DerSequence(start));
+      return ptr_lib::shared_ptr<DerSequence>(new DerSequence(start));
     case DER_PRINTABLE_STRING:
-      return shared_ptr<DerPrintableString>(new DerPrintableString(start));
+      return ptr_lib::shared_ptr<DerPrintableString>(new DerPrintableString(start));
     case DER_GENERALIZED_TIME:
-      return shared_ptr<DerGtime>(new DerGtime(start));
+      return ptr_lib::shared_ptr<DerGtime>(new DerGtime(start));
     default:
       throw DerDecodingException("Unimplemented DER type");
   }
@@ -190,7 +189,7 @@
   
   while (accSize < size_) {
     // _LOG_DEBUG("accSize: " << accSize);
-    shared_ptr<DerNode> nodePtr = DerNode::parse(start);
+    ptr_lib::shared_ptr<DerNode> nodePtr = DerNode::parse(start);
     accSize += nodePtr->getSize();
     addChild(nodePtr, false);
   }
@@ -215,7 +214,7 @@
 Blob
 DerComplex::getRaw()
 {
-  shared_ptr<vector<uint8_t> > blob(new vector<uint8_t>());
+  ptr_lib::shared_ptr<vector<uint8_t> > blob(new vector<uint8_t>());
   blob->insert(blob->end(), header_.begin(), header_.end());
 
   DerNodePtrList::iterator it = nodeList_.begin();
@@ -241,7 +240,7 @@
 }
 
 void
-DerComplex::addChild(shared_ptr<DerNode> nodePtr, bool notifyParent)
+DerComplex::addChild(ptr_lib::shared_ptr<DerNode> nodePtr, bool notifyParent)
 {
   nodePtr->setParent(this);
 
diff --git a/src/encoding/der/visitor/certificate-data-visitor.cpp b/src/encoding/der/visitor/certificate-data-visitor.cpp
index 4270d68..7edf794 100644
--- a/src/encoding/der/visitor/certificate-data-visitor.cpp
+++ b/src/encoding/der/visitor/certificate-data-visitor.cpp
@@ -18,7 +18,6 @@
 #include "certificate-data-visitor.hpp"
 
 using namespace std;
-using namespace ndn::ptr_lib;
 
 INIT_LOGGER("ndn.der.CertificateDataVisitor");
 
@@ -41,7 +40,7 @@
   children[1]->accept(subjectVisitor, param);
   PublicKeyVisitor pubkeyVisitor;
   Certificate* certData = ndnboost::any_cast<Certificate*>(param);
-  certData->setPublicKeyInfo(*ndnboost::any_cast<shared_ptr<PublicKey> >(children[2]->accept(pubkeyVisitor)));
+  certData->setPublicKeyInfo(*ndnboost::any_cast<ptr_lib::shared_ptr<PublicKey> >(children[2]->accept(pubkeyVisitor)));
       
   if(children.size() > 3)
     {
diff --git a/src/encoding/der/visitor/public-key-visitor.cpp b/src/encoding/der/visitor/public-key-visitor.cpp
index a2eab56..a5f5542 100644
--- a/src/encoding/der/visitor/public-key-visitor.cpp
+++ b/src/encoding/der/visitor/public-key-visitor.cpp
@@ -12,7 +12,6 @@
 #include "public-key-visitor.hpp"
 
 using namespace std;
-using namespace ndn::ptr_lib;
 
 namespace ndn {
 
@@ -24,10 +23,10 @@
   DerNodePtrList& children = derSeq.getChildren();
 
   SimpleVisitor simpleVisitor;
-  shared_ptr<DerSequence> algoSeq = dynamic_pointer_cast<DerSequence>(children[0]); 
+  ptr_lib::shared_ptr<DerSequence> algoSeq = ptr_lib::dynamic_pointer_cast<DerSequence>(children[0]); 
   OID algorithm = ndnboost::any_cast<OID>(algoSeq->getChildren()[0]->accept(simpleVisitor));  
   Blob raw = derSeq.getRaw();   
-  return ndnboost::any(shared_ptr<PublicKey>(new PublicKey(algorithm, raw)));    
+  return ndnboost::any(ptr_lib::shared_ptr<PublicKey>(new PublicKey(algorithm, raw)));    
 }
 
 } // der
