diff --git a/src/browsecontactdialog.cpp b/src/browsecontactdialog.cpp
index ee783e5..58396ba 100644
--- a/src/browsecontactdialog.cpp
+++ b/src/browsecontactdialog.cpp
@@ -45,8 +45,8 @@
 
   connect(ui->ContactList->selectionModel(), SIGNAL(selectionChanged(const QItemSelection &, const QItemSelection &)),
           this, SLOT(updateSelection(const QItemSelection &, const QItemSelection &)));
-  connect(&*m_contactManager, SIGNAL(contactCertificateFetched(const ndn::security::IdentityCertificate &)),
-	  this, SLOT(onCertificateFetched(const ndn::security::IdentityCertificate &)));
+  connect(&*m_contactManager, SIGNAL(contactCertificateFetched(const ndn::IdentityCertificate &)),
+	  this, SLOT(onCertificateFetched(const ndn::IdentityCertificate &)));
   connect(&*m_contactManager, SIGNAL(contactCertificateFetchFailed(const ndn::Name&)),
           this, SLOT(onCertificateFetchFailed(const ndn::Name&)));
   connect(&*m_contactManager, SIGNAL(warning(QString)),
@@ -71,7 +71,7 @@
   try{
     using namespace boost::asio::ip;
     tcp::iostream request_stream;
-    request_stream.expires_from_now(boost::posix_time::milliseconds(3000));
+    request_stream.expires_from_now(boost::posix_time::milliseconds(5000));
     request_stream.connect("ndncert.named-data.net","80");
     if(!request_stream)
       {
@@ -137,6 +137,11 @@
 {
   vector<string> certNameList;
   getCertNames(certNameList);
+  _LOG_DEBUG("Get Certificate Name List");
+  for(int i = 0; i < certNameList.size(); i++)
+    {
+      _LOG_DEBUG(" " << certNameList[i]);
+    }
   
   if(filter)
     {
@@ -198,6 +203,8 @@
   int count = 0;
   for(; it != m_certificateNameList.end(); it++)
     {
+      _LOG_DEBUG("fetch " << it->toUri());
+      usleep(1000);
       m_contactManager->fetchIdCertificate(*it);
     }
 }
@@ -205,8 +212,8 @@
 void
 BrowseContactDialog::onCertificateFetched(const IdentityCertificate& identityCertificate)
 {
-  Name certName = identityCertificate.getName();
-  Name certNameNoVersion = certName.getPrefix(certName.size()-1);
+  Name certNameNoVersion = identityCertificate.getName().getPrefix(-1);
+  _LOG_DEBUG("Fetch: " << certNameNoVersion.toUri());
   m_certificateMap.insert(pair<Name, IdentityCertificate>(certNameNoVersion, identityCertificate));
   m_profileMap.insert(pair<Name, Profile>(certNameNoVersion, Profile(identityCertificate)));
   string name = m_profileMap[certNameNoVersion].getProfileEntry("name");
@@ -221,7 +228,9 @@
 
 void
 BrowseContactDialog::onCertificateFetchFailed(const Name& identity)
-{}
+{
+  _LOG_DEBUG("Cannot fetch " << identity.toUri());
+}
 
 void
 BrowseContactDialog::refreshList()
diff --git a/src/chatdialog.cpp b/src/chatdialog.cpp
index 5a6d483..c2d498d 100644
--- a/src/chatdialog.cpp
+++ b/src/chatdialog.cpp
@@ -35,6 +35,7 @@
 Q_DECLARE_METATYPE(size_t)
 
 ChatDialog::ChatDialog(ndn::ptr_lib::shared_ptr<ContactManager> contactManager,
+                       ndn::ptr_lib::shared_ptr<ndn::IdentityManager> identityManager,
                        const ndn::Name& chatroomPrefix,
 		       const ndn::Name& localPrefix,
                        const ndn::Name& defaultIdentity,
@@ -48,6 +49,7 @@
   , m_localPrefix(localPrefix)
   , m_defaultIdentity(defaultIdentity)
   , m_invitationPolicyManager(new InvitationPolicyManager(m_chatroomPrefix.get(-1).toEscapedString(), m_defaultIdentity))
+  , m_identityManager(identityManager)
   , m_nick(nick)
   , m_sock(NULL)
   , m_lastMsgTime(0)
@@ -85,13 +87,10 @@
 
   m_timer = new QTimer(this);
 
+  startFace();
+
   ndn::Name certificateName = m_identityManager->getDefaultCertificateNameForIdentity(m_defaultIdentity);
-  m_syncPolicyManager = ndn::ptr_lib::make_shared<SyncPolicyManager>(m_defaultIdentity, certificateName, m_chatroomPrefix);
-
-  m_transport = ndn::ptr_lib::make_shared<ndn::TcpTransport>();
-  m_face = ndn::ptr_lib::make_shared<ndn::Face>(m_transport, ndn::ptr_lib::make_shared<ndn::TcpTransport::ConnectionInfo>("localhost"));
-
-  connectToDaemon();
+  m_syncPolicyManager = ndn::ptr_lib::make_shared<SyncPolicyManager>(m_defaultIdentity, certificateName, m_chatroomPrefix, m_face, m_transport);
 
   connect(ui->inviteButton, SIGNAL(clicked()),
           this, SLOT(openInviteListDialog()));
@@ -129,10 +128,48 @@
       delete m_sock;
       m_sock = NULL;
     }
+  shutdownFace();
+}
+
+void
+ChatDialog::startFace()
+{
+  m_transport = ndn::ptr_lib::make_shared<ndn::TcpTransport>();
+  m_face = ndn::ptr_lib::make_shared<ndn::Face>(m_transport, ndn::ptr_lib::make_shared<ndn::TcpTransport::ConnectionInfo>("localhost"));
+  
+  connectToDaemon();
+
+  m_running = true;
+  m_thread = boost::thread (&ChatDialog::eventLoop, this);  
+}
+
+void
+ChatDialog::shutdownFace()
+{
+  {
+    boost::unique_lock<boost::recursive_mutex> lock(m_mutex);
+    m_running = false;
+  }
+  
+  m_thread.join();
   m_face->shutdown();
 }
 
 void
+ChatDialog::eventLoop()
+{
+  while (m_running)
+    {
+      try{
+        m_face->processEvents();
+        usleep(1000);
+      }catch(std::exception& e){
+        _LOG_DEBUG(" " << e.what() );
+      }
+    }
+}
+
+void
 ChatDialog::connectToDaemon()
 {
   //Hack! transport does not connect to daemon unless an interest is expressed.
@@ -314,7 +351,12 @@
   ndn::ptr_lib::shared_ptr<const ndn::Sha256WithRsaSignature> sha256sig = ndn::ptr_lib::dynamic_pointer_cast<const ndn::Sha256WithRsaSignature>(m_identityManager->signByCertificate(signedBlob.buf(), signedBlob.size(), certificateName));
   const ndn::Blob& sigBits = sha256sig->getSignature();
 
+  _LOG_DEBUG("size A: " << interestName.size());
+
   interestName.append(sigBits);
+
+  _LOG_DEBUG("size B: " << interestName.size());
+
   //TODO... remove version from invitation interest
   //  interestName.appendVersion();
 
@@ -421,6 +463,8 @@
   
   m_sock = new Sync::SyncSocket(m_chatroomPrefix.toUri(),
                                 m_syncPolicyManager,
+                                m_face,
+                                m_transport,
                                 boost::bind(&ChatDialog::processTreeUpdateWrapper, this, _1, _2),
                                 boost::bind(&ChatDialog::processRemoveWrapper, this, _1));
   
@@ -854,6 +898,8 @@
       usleep(100000);
       m_sock = new Sync::SyncSocket(m_chatroomPrefix.toUri(),
                                     m_syncPolicyManager,
+                                    m_face,
+                                    m_transport,
                                     bind(&ChatDialog::processTreeUpdateWrapper, this, _1, _2),
                                     bind(&ChatDialog::processRemoveWrapper, this, _1));
       usleep(100000);
diff --git a/src/chatdialog.h b/src/chatdialog.h
index 0c06783..be2c89b 100644
--- a/src/chatdialog.h
+++ b/src/chatdialog.h
@@ -33,6 +33,10 @@
 #include <sync-seq-no.h>
 #include "chatbuf.pb.h"
 #include "digesttreescene.h"
+
+#include <boost/thread/locks.hpp>
+#include <boost/thread/recursive_mutex.hpp>
+#include <boost/thread/thread.hpp>
 #endif
 
 typedef ndn::func_lib::function<void()> OnEventualTimeout;
@@ -49,6 +53,7 @@
 
 public:
   explicit ChatDialog(ndn::ptr_lib::shared_ptr<ContactManager> contactManager,
+                      ndn::ptr_lib::shared_ptr<ndn::IdentityManager> identityManager,
                       const ndn::Name& chatroomPrefix,
                       const ndn::Name& localPrefix,
                       const ndn::Name& defaultIdentity,
@@ -110,6 +115,15 @@
 
 private:
 
+  void 
+  startFace();
+
+  void
+  shutdownFace();
+
+  void
+  eventLoop();
+
   void
   connectToDaemon();
 
@@ -334,6 +348,10 @@
   ndn::ptr_lib::shared_ptr<ndn::Face> m_face;
   ndn::ptr_lib::shared_ptr<ndn::Transport> m_transport;
 
+  boost::recursive_mutex m_mutex;
+  boost::thread m_thread;
+  bool m_running;
+
   ndn::Name m_newLocalPrefix;
   bool m_newLocalPrefixReady;
 
diff --git a/src/chronos-invitation.cpp b/src/chronos-invitation.cpp
index 28d36e1..fb9d918 100644
--- a/src/chronos-invitation.cpp
+++ b/src/chronos-invitation.cpp
@@ -22,7 +22,7 @@
 ChronosInvitation::ChronosInvitation(const ndn::Name& originalInterestName)
   : m_interestName(originalInterestName)
 {
-  Name interestName = originalInterestName.getPrefix(-1);
+  Name interestName = originalInterestName;
   if(interestName.get(0).toEscapedString() != string("ndn")
      || interestName.get(1).toEscapedString() != string("broadcast")
      || interestName.get(2).toEscapedString() != string("chronos")
diff --git a/src/contact-manager.cpp b/src/contact-manager.cpp
index 25c32a1..b940bd8 100644
--- a/src/contact-manager.cpp
+++ b/src/contact-manager.cpp
@@ -28,48 +28,47 @@
 
 INIT_LOGGER("ContactManager");
 
-ContactManager::ContactManager(shared_ptr<IdentityManager> identityManager, QObject* parent)
-  : QObject(parent)
+ContactManager::ContactManager(shared_ptr<IdentityManager> identityManager, 
+                               shared_ptr<Face> face,
+                               shared_ptr<Transport> transport,
+                               QObject* parent)
+  : QObject(parent),
+    m_face(face),
+    m_transport(transport)
 {
   m_identityManager = identityManager;
   m_contactStorage = make_shared<ContactStorage>();
   m_dnsStorage = make_shared<DnsStorage>();
 
-  m_transport = make_shared<TcpTransport>();
-  m_face = make_shared<Face>(m_transport, make_shared<TcpTransport::ConnectionInfo>("localhost"));
-  
-  connectToDaemon();
-
   initializeSecurity();
 }
 
 ContactManager::~ContactManager()
-{
-}
+{}
 
-void
-ContactManager::connectToDaemon()
-{
-  //Hack! transport does not connect to daemon unless an interest is expressed.
-  Name name("/ndn");
-  shared_ptr<ndn::Interest> interest = make_shared<ndn::Interest>(name);
-  m_face->expressInterest(*interest, 
-                          bind(&ContactManager::onConnectionData, this, _1, _2),
-                          bind(&ContactManager::onConnectionDataTimeout, this, _1));
-}
+// void
+// ContactManager::connectToDaemon()
+// {
+//   //Hack! transport does not connect to daemon unless an interest is expressed.
+//   Name name("/ndn");
+//   shared_ptr<ndn::Interest> interest = make_shared<ndn::Interest>(name);
+//   m_face->expressInterest(*interest, 
+//                           bind(&ContactManager::onConnectionData, this, _1, _2),
+//                           bind(&ContactManager::onConnectionDataTimeout, this, _1));
+// }
 
-void
-ContactManager::onConnectionData(const shared_ptr<const ndn::Interest>& interest,
-                            const shared_ptr<Data>& data)
-{
-  _LOG_DEBUG("onConnectionData");
-}
+// void
+// ContactManager::onConnectionData(const shared_ptr<const ndn::Interest>& interest,
+//                             const shared_ptr<Data>& data)
+// {
+//   _LOG_DEBUG("onConnectionData");
+// }
 
-void
-ContactManager::onConnectionDataTimeout(const shared_ptr<const ndn::Interest>& interest)
-{
-  _LOG_DEBUG("onConnectionDataTimeout");
-}
+// void
+// ContactManager::onConnectionDataTimeout(const shared_ptr<const ndn::Interest>& interest)
+// {
+//   _LOG_DEBUG("onConnectionDataTimeout");
+// }
 
 void
 ContactManager::initializeSecurity()
@@ -291,7 +290,7 @@
 }
 
 void
-ContactManager::fetchIdCertificate(const ndn::Name& certName)
+ContactManager::fetchIdCertificate(const Name& certName)
 {
   Name interestName = certName;
   
@@ -308,7 +307,9 @@
 
 void
 ContactManager::onIdCertificateTimeoutNotify(const Name& identity)
-{ emit contactCertificateFetchFailed (identity); }
+{ 
+  emit contactCertificateFetchFailed (identity); 
+}
 
 
 void
@@ -320,7 +321,9 @@
 
 void
 ContactManager::onIdCertificateVerifyFailed(const shared_ptr<Data>& data, const Name& identity)
-{ emit contactCertificateFetchFailed (identity); }
+{ 
+  emit contactCertificateFetchFailed (identity); 
+}
 
 void
 ContactManager::onTargetData(const shared_ptr<const ndn::Interest>& interest, 
@@ -405,7 +408,7 @@
                              int retry /* = 1 */,
                              int stepCount /* = 0 */)
 {
-  m_face->expressInterest(interest, 
+  uint64_t id = m_face->expressInterest(interest, 
                           boost::bind(&ContactManager::onTargetData, 
                                       this,
                                       _1,
@@ -422,6 +425,8 @@
                                       onVerified,
                                       onVerifyFailed,
                                       timeoutNotify));
+
+  _LOG_DEBUG("id: " << id << " entry id: " << m_face->getNode().getEntryIndexForExpressedInterest(interest.getName()));
 }
 
 void
diff --git a/src/contact-manager.h b/src/contact-manager.h
index 0c4cc06..d096abf 100644
--- a/src/contact-manager.h
+++ b/src/contact-manager.h
@@ -31,6 +31,8 @@
 
 public:
   ContactManager(ndn::ptr_lib::shared_ptr<ndn::IdentityManager> identityManager,
+                 ndn::ptr_lib::shared_ptr<ndn::Face> m_face,
+                 ndn::ptr_lib::shared_ptr<ndn::Transport> m_transport,
                  QObject* parent = 0);
 
   ~ContactManager();
@@ -89,15 +91,15 @@
   { return m_identityManager; }
 
 private:
-  void 
-  connectToDaemon();
+  // void 
+  // connectToDaemon();
 
-  void
-  onConnectionData(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest,
-                   const ndn::ptr_lib::shared_ptr<ndn::Data>& data);
+  // void
+  // onConnectionData(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest,
+  //                  const ndn::ptr_lib::shared_ptr<ndn::Data>& data);
  
-  void
-  onConnectionDataTimeout(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest);
+  // void
+  // onConnectionDataTimeout(const ndn::ptr_lib::shared_ptr<const ndn::Interest>& interest);
   
   void
   initializeSecurity();
diff --git a/src/contactpanel.cpp b/src/contactpanel.cpp
index f3ad618..d9f3324 100644
--- a/src/contactpanel.cpp
+++ b/src/contactpanel.cpp
@@ -56,14 +56,16 @@
 {
   qRegisterMetaType<IdentityCertificate>("IdentityCertificate");
   qRegisterMetaType<ChronosInvitation>("ChronosInvitation");
-  
+
+  startFace();  
+
   createAction();
 
   shared_ptr<BasicIdentityStorage> publicStorage = make_shared<BasicIdentityStorage>();
   shared_ptr<OSXPrivateKeyStorage> privateStorage = make_shared<OSXPrivateKeyStorage>();
   m_identityManager = make_shared<IdentityManager>(publicStorage, privateStorage);
 
-  m_contactManager = make_shared<ContactManager>(m_identityManager);
+  m_contactManager = make_shared<ContactManager>(m_identityManager, m_face, m_transport);
 
   connect(&*m_contactManager, SIGNAL(noNdnConnection(const QString&)),
           this, SLOT(showError(const QString&)));
@@ -96,10 +98,6 @@
  
   ui->setupUi(this);
 
-  m_transport = make_shared<TcpTransport>();
-  m_face = make_shared<Face>(m_transport, make_shared<TcpTransport::ConnectionInfo>("localhost"));
-  
-  connectToDaemon();
   
   m_localPrefix = Name("/private/local");
   setLocalPrefix();
@@ -201,6 +199,46 @@
   map<Name, ChatDialog*>::iterator it = m_chatDialogs.begin();
   for(; it != m_chatDialogs.end(); it++)
     delete it->second;
+
+  shutdownFace();
+}
+
+void
+ContactPanel::startFace()
+{
+  m_transport = make_shared<TcpTransport>();
+  m_face = make_shared<Face>(m_transport, make_shared<TcpTransport::ConnectionInfo>("localhost"));
+  
+  connectToDaemon();
+
+  m_running = true;
+  m_thread = boost::thread (&ContactPanel::eventLoop, this);  
+}
+
+void
+ContactPanel::shutdownFace()
+{
+  {
+    boost::unique_lock<boost::recursive_mutex> lock(m_mutex);
+    m_running = false;
+  }
+  
+  m_thread.join();
+  m_face->shutdown();
+}
+
+void
+ContactPanel::eventLoop()
+{
+  while (m_running)
+    {
+      try{
+        m_face->processEvents();
+        usleep(100);
+      }catch(std::exception& e){
+        _LOG_DEBUG(" " << e.what() );
+      }
+    }
 }
 
 void
@@ -251,6 +289,7 @@
   vector<shared_ptr<ContactItem> >::const_iterator it = m_contactList.begin();
   for(; it != m_contactList.end(); it++)
     {
+      _LOG_DEBUG("load contact: " << (*it)->getNameSpace().toUri());
       m_policyManager->addTrustAnchor((*it)->getSelfEndorseCertificate());
     }
 }
@@ -419,6 +458,7 @@
                            uint64_t registeredPrefixId)
 {
   _LOG_DEBUG("Receive invitation!" << interest->getName().toUri());
+
   
   shared_ptr<ChronosInvitation> invitation;
   try{
@@ -465,6 +505,8 @@
       return;
     }
 
+  _LOG_DEBUG("Cannot find the inviter's key in trust anchors");
+
   Interest newInterest(invitation->getInviterCertificateName());
   OnVerified onVerified = boost::bind(&ContactPanel::onInvitationCertVerified, this, _1, invitation);
   OnVerifyFailed onVerifyFailed = boost::bind(&ContactPanel::onInvitationCertVerifyFailed, this, _1);
@@ -818,7 +860,7 @@
   Name inviteeNamespace(invitee.toStdString());
   shared_ptr<ContactItem> inviteeItem = m_contactManager->getContact(inviteeNamespace);
 
-  ChatDialog* chatDialog = new ChatDialog(m_contactManager, chatroomName, m_localPrefix, m_defaultIdentity, m_nickName);
+  ChatDialog* chatDialog = new ChatDialog(m_contactManager, m_identityManager, chatroomName, m_localPrefix, m_defaultIdentity, m_nickName);
   m_chatDialogs.insert(pair <Name, ChatDialog*> (chatroomName, chatDialog));
 
   connect(chatDialog, SIGNAL(closeChatDialog(const ndn::Name&)),
@@ -844,7 +886,7 @@
   Name chatroomName("/ndn/broadcast/chronos");
   chatroomName.append(invitation.getChatroom());
 
-  ChatDialog* chatDialog = new ChatDialog(m_contactManager, chatroomName, m_localPrefix, m_defaultIdentity, m_nickName, true);
+  ChatDialog* chatDialog = new ChatDialog(m_contactManager, m_identityManager, chatroomName, m_localPrefix, m_defaultIdentity, m_nickName, true);
 
   connect(chatDialog, SIGNAL(closeChatDialog(const ndn::Name&)),
           this, SLOT(removeChatDialog(const ndn::Name&)));
@@ -867,7 +909,12 @@
 ContactPanel::acceptInvitation(const ChronosInvitation& invitation, 
                                const IdentityCertificate& identityCertificate)
 {
-  Data data(invitation.getInterestName());
+  Name dataName = invitation.getInterestName();
+  time_t nowSeconds = time(NULL);
+  struct tm current = *gmtime(&nowSeconds);
+  MillisecondsSince1970 version = timegm(&current) * 1000.0;
+  dataName.appendVersion(version);
+  Data data(dataName);
   string content = m_localPrefix.toUri();
   data.setContent((const uint8_t *)&content[0], content.size());
   data.getMetaInfo().setTimestampMilliseconds(time(NULL) * 1000.0);
diff --git a/src/contactpanel.h b/src/contactpanel.h
index 1c2c9fc..615a836 100644
--- a/src/contactpanel.h
+++ b/src/contactpanel.h
@@ -32,6 +32,9 @@
 #include "contact-manager.h"
 #include "chronos-invitation.h"
 #include "panel-policy-manager.h"
+#include <boost/thread/locks.hpp>
+#include <boost/thread/recursive_mutex.hpp>
+#include <boost/thread/thread.hpp>
 #endif
 
 
@@ -49,6 +52,16 @@
   ~ContactPanel();
 
 private:
+  
+  void 
+  startFace();
+
+  void
+  shutdownFace();
+
+  void
+  eventLoop();
+  
   void 
   connectToDaemon();
 
@@ -275,6 +288,11 @@
   ndn::ptr_lib::shared_ptr<ndn::IdentityManager> m_identityManager;
   ndn::ptr_lib::shared_ptr<ndn::Transport> m_transport;
   ndn::ptr_lib::shared_ptr<ndn::Face> m_face;
+
+  boost::recursive_mutex m_mutex;
+  boost::thread m_thread;
+  bool m_running;
+
   uint64_t m_invitationListenerId;
 
   ndn::Name m_defaultIdentity;
diff --git a/src/invitation-policy-manager.cpp b/src/invitation-policy-manager.cpp
index cd86cbd..0885e25 100644
--- a/src/invitation-policy-manager.cpp
+++ b/src/invitation-policy-manager.cpp
@@ -79,20 +79,20 @@
   if(m_invitationPolicyRule->satisfy(*data))
     {
       // Name keyName = IdentityCertificate::certificateNameToPublicKeyName(keyLocatorName);
-      // map<Name, Publickey>::iterator it = m_trustAnchors.find(keyName);
+      // map<Name, PublicKey>::iterator it = m_trustAnchors.find(keyName);
       // if(m_trustAnchors.end() != it)
       //   {
-      //     if(verifySignature(*data, it->second))
-      //       verifiedCallback(data);
+      //     if(Sha256WithRsaHandler::verifySignature(*data, it->second))
+      //       onVerified(data);
       //     else
-      //       unverifiedCallback(data);
+      //       onVerifyFailed(data);
 
-      //     return NULL;
+      //     return CHRONOCHAT_NULL_VALIDATIONREQUEST_PTR;
       //   }
 
       shared_ptr<const Certificate> trustedCert = m_certificateCache.getCertificate(keyLocatorName);
       
-      if(!trustedCert){
+      if(trustedCert != ndn::TCC_NULL_CERTIFICATE_PTR){
 	if(Sha256WithRsaHandler::verifySignature(*data, trustedCert->getPublicKeyInfo()))
 	  onVerified(data);
 	else
diff --git a/src/null-ptrs.h b/src/null-ptrs.h
index 0dfd3f2..0120a2f 100644
--- a/src/null-ptrs.h
+++ b/src/null-ptrs.h
@@ -19,6 +19,7 @@
 #include "profile.h"
 #include <ndn-cpp/security/certificate/identity-certificate.hpp>
 #include <ndn-cpp/security/policy/validation-request.hpp>
+#include <ndn-cpp/security/certificate/certificate.hpp>
 
 
 static std::string CHRONOCHAT_NULL_STR;
@@ -31,5 +32,6 @@
 static ndn::ptr_lib::shared_ptr<Profile> CHRONOCHAT_NULL_PROFILE_PTR;
 static ndn::ptr_lib::shared_ptr<ndn::PublicKey> CHRONOCHAT_NULL_PUBLICKEY_PTR;
 static ndn::ptr_lib::shared_ptr<ndn::ValidationRequest> CHRONOCHAT_NULL_VALIDATIONREQUEST_PTR;
+static ndn::ptr_lib::shared_ptr<const ndn::Certificate> CHRONOCHAT_NULL_CONST_CERTIFICATE_PTR;
 
 #endif
diff --git a/src/panel-policy-manager.cpp b/src/panel-policy-manager.cpp
index 8d6300d..92511ed 100644
--- a/src/panel-policy-manager.cpp
+++ b/src/panel-policy-manager.cpp
@@ -171,7 +171,7 @@
 void
 PanelPolicyManager::addTrustAnchor(const EndorseCertificate& selfEndorseCertificate)
 { 
-  // _LOG_DEBUG("Add Anchor: " << selfEndorseCertificate.getPublicKeyName().toUri());
+  _LOG_DEBUG("Add Anchor: " << selfEndorseCertificate.getPublicKeyName().toUri());
   m_trustAnchors.insert(pair <Name, PublicKey > (selfEndorseCertificate.getPublicKeyName(), selfEndorseCertificate.getPublicKeyInfo())); 
 }
 
@@ -185,6 +185,7 @@
 PanelPolicyManager::getTrustedKey(const Name& inviterCertName)
 {
   Name keyLocatorName = inviterCertName.getPrefix(-1);
+  _LOG_DEBUG("inviter cert name: " << inviterCertName.toUri());
   m_keyNameRegex->match(keyLocatorName);
   Name keyName = m_keyNameRegex->expand();
 
diff --git a/src/profile-data.cpp b/src/profile-data.cpp
index 6bb70cc..0e17552 100644
--- a/src/profile-data.cpp
+++ b/src/profile-data.cpp
@@ -44,11 +44,11 @@
 
 }
 
-ProfileData::ProfileData(const ProfileData& profileData)
-  : Data(profileData)
-  , m_identity(profileData.m_identity)
-  , m_profile(profileData.m_profile)
-{}
+// ProfileData::ProfileData(const ProfileData& profileData)
+//   : Data(profileData)
+//   , m_identity(profileData.m_identity)
+//   , m_profile(profileData.m_profile)
+// {}
 
 ProfileData::ProfileData(const Data& data)
   : Data(data)
diff --git a/src/profile-data.h b/src/profile-data.h
index dcde0d8..dbe4ca5 100644
--- a/src/profile-data.h
+++ b/src/profile-data.h
@@ -21,7 +21,7 @@
 
   ProfileData(const Profile& profile);
 
-  ProfileData(const ProfileData& profileData);
+  // ProfileData(const ProfileData& profileData);
 
   ProfileData(const ndn::Data& data);
 
