diff --git a/model/sync-digest.cc b/model/sync-digest.cc
index 6da6e78..7a5b605 100644
--- a/model/sync-digest.cc
+++ b/model/sync-digest.cc
@@ -128,6 +128,18 @@
   return m_buffer == 0;
 }
 
+bool
+Digest::zero () const
+{
+  if (m_buffer == 0)
+    BOOST_THROW_EXCEPTION (Error::DigestCalculationError ()
+                           << errmsg_info_str ("Digest has not been yet finalized"));
+
+  if (m_hashLength == 1 && m_buffer[0] == 0)
+    return true;  
+}
+
+
 void
 Digest::reset ()
 {
@@ -159,16 +171,11 @@
                            << errmsg_info_str ("EVP_DigestFinal_ex returned error")
                            << errmsg_info_int (ok));
 }
-  
+
 std::size_t
 Digest::getHash () const
 {
-  if (m_buffer == 0)
-    BOOST_THROW_EXCEPTION (Error::DigestCalculationError ()
-                           << errmsg_info_str ("Digest has not been yet finalized"));
-
-  if (m_hashLength == 1 && m_buffer[0] == 0)
-    return 0;
+  if (zero ()) return 0;
   
   if (sizeof (std::size_t) > m_hashLength)
     {
diff --git a/model/sync-digest.h b/model/sync-digest.h
index 15c7278..42cfd81 100644
--- a/model/sync-digest.h
+++ b/model/sync-digest.h
@@ -108,6 +108,14 @@
   inline Digest &
   operator << (uint32_t value);
 
+  /**
+   * @brief Checks if the stored hash is zero-root hash
+   *
+   * Zero-root hash is a valid hash that optimally represents an empty state
+   */
+  bool
+  zero () const;
+  
 private:
   Digest &
   operator = (Digest &digest) { return *this; }
diff --git a/model/sync-logic.cc b/model/sync-logic.cc
index 0f71b95..3638045 100644
--- a/model/sync-logic.cc
+++ b/model/sync-logic.cc
@@ -83,13 +83,23 @@
 {
   //cout << "SyncLogic::processSyncInterest " << timedProcessing << endl;
   recursive_mutex::scoped_lock lock (m_stateMutex);
-    
-  if (*m_state.getDigest() == *digest)
-  {
-    m_syncInterestTable.insert (interestName);
-    return;
-  }
 
+  if (*m_state.getDigest() == *digest)
+    {
+      // cout << interestName << "\n";
+      m_syncInterestTable.insert (interestName);
+      return;
+    }
+
+  // Special case when state is not empty and we have received request with zero-root digest
+  if (digest->zero ())
+    {
+      m_ccnxHandle->publishData (interestName + "/state",
+                                 lexical_cast<string> (m_state),
+                                 m_syncResponseFreshness);
+      return;
+    }
+  
   DiffStateContainer::iterator stateInDiffLog = m_log.find (digest);
 
   if (stateInDiffLog != m_log.end ())
