diff --git a/src/detail/face-impl.hpp b/src/detail/face-impl.hpp
index 460d316..6844813 100644
--- a/src/detail/face-impl.hpp
+++ b/src/detail/face-impl.hpp
@@ -149,9 +149,9 @@
   {
     this->ensureConnected();
 
-    if (!data->getLocalControlHeader().empty(false, true))
+    if (!data->getLocalControlHeader().empty(false, false))
       {
-        m_face.m_transport->send(data->getLocalControlHeader().wireEncode(*data, false, true),
+        m_face.m_transport->send(data->getLocalControlHeader().wireEncode(*data, false, false),
                                  data->wireEncode());
       }
     else
diff --git a/src/face.cpp b/src/face.cpp
index 57f9605..744ee0d 100644
--- a/src/face.cpp
+++ b/src/face.cpp
@@ -483,8 +483,7 @@
 
   if (block.type() == tlv::Interest)
     {
-      shared_ptr<Interest> interest = make_shared<Interest>();
-      interest->wireDecode(block);
+      shared_ptr<Interest> interest = make_shared<Interest>(block);
       if (&block != &blockFromDaemon)
         interest->getLocalControlHeader().wireDecode(blockFromDaemon);
 
@@ -492,8 +491,7 @@
     }
   else if (block.type() == tlv::Data)
     {
-      shared_ptr<Data> data = make_shared<Data>();
-      data->wireDecode(block);
+      shared_ptr<Data> data = make_shared<Data>(block);
       if (&block != &blockFromDaemon)
         data->getLocalControlHeader().wireDecode(blockFromDaemon);
 
diff --git a/src/util/dummy-client-face.cpp b/src/util/dummy-client-face.cpp
index 852642d..f5e1172 100644
--- a/src/util/dummy-client-face.cpp
+++ b/src/util/dummy-client-face.cpp
@@ -63,7 +63,11 @@
   virtual void
   send(const Block& header, const Block& payload)
   {
-    this->send(payload);
+    EncodingBuffer encoder(header.size() + payload.size(), header.size() + payload.size());
+    encoder.appendByteArray(header.wire(), header.size());
+    encoder.appendByteArray(payload.wire(), payload.size());
+
+    this->send(encoder.block());
   }
 
   boost::asio::io_service&
@@ -94,13 +98,21 @@
 void
 DummyClientFace::construct(const Options& options)
 {
-  m_transport->onSendBlock.connect([this] (const Block& wire) {
-    if (wire.type() == tlv::Interest) {
-      shared_ptr<Interest> interest = make_shared<Interest>(wire);
+  m_transport->onSendBlock.connect([this] (const Block& blockFromDaemon) {
+    const Block& block = nfd::LocalControlHeader::getPayload(blockFromDaemon);
+
+    if (block.type() == tlv::Interest) {
+      shared_ptr<Interest> interest = make_shared<Interest>(block);
+      if (&block != &blockFromDaemon)
+        interest->getLocalControlHeader().wireDecode(blockFromDaemon);
+
       onSendInterest(*interest);
     }
-    else if (wire.type() == tlv::Data) {
-      shared_ptr<Data> data = make_shared<Data>(wire);
+    else if (block.type() == tlv::Data) {
+      shared_ptr<Data> data = make_shared<Data>(block);
+      if (&block != &blockFromDaemon)
+        data->getLocalControlHeader().wireDecode(blockFromDaemon);
+
       onSendData(*data);
     }
   });
@@ -156,7 +168,21 @@
 void
 DummyClientFace::receive(const Packet& packet)
 {
-  m_transport->receive(packet.wireEncode());
+  // do not restrict what injected control header can contain
+  if (!packet.getLocalControlHeader().empty(true, true)) {
+
+    Block header = packet.getLocalControlHeader().wireEncode(packet, true, true);
+    Block payload = packet.wireEncode();
+
+    EncodingBuffer encoder(header.size() + payload.size(), header.size() + payload.size());
+    encoder.appendByteArray(header.wire(), header.size());
+    encoder.appendByteArray(payload.wire(), payload.size());
+
+    m_transport->receive(encoder.block());
+  }
+  else {
+    m_transport->receive(packet.wireEncode());
+  }
 }
 
 template void
