diff --git a/core/common.hpp b/core/common.hpp
index 614dd4e..06e4fe1 100644
--- a/core/common.hpp
+++ b/core/common.hpp
@@ -44,6 +44,7 @@
 #include <iostream>
 #include <limits>
 #include <memory>
+#include <optional>
 #include <stdexcept>
 #include <string>
 #include <string_view>
diff --git a/tests/chunks/discover-version.t.cpp b/tests/chunks/discover-version.t.cpp
index 7d18886..a07ecce 100644
--- a/tests/chunks/discover-version.t.cpp
+++ b/tests/chunks/discover-version.t.cpp
@@ -63,8 +63,8 @@
   util::DummyClientFace face{m_io};
   Options opt;
   unique_ptr<DiscoverVersion> discover;
-  optional<Name> discoveredName;
-  optional<uint64_t> discoveredVersion;
+  std::optional<Name> discoveredName;
+  std::optional<uint64_t> discoveredVersion;
   bool isDiscoveryFinished = false;
 };
 
diff --git a/tests/peek/ndnpeek.t.cpp b/tests/peek/ndnpeek.t.cpp
index 30c305a..c3979fd 100644
--- a/tests/peek/ndnpeek.t.cpp
+++ b/tests/peek/ndnpeek.t.cpp
@@ -86,7 +86,7 @@
   checkOutput(output_test_stream& output, const Data& data)
   {
     const Block& block = data.wireEncode();
-    std::string expected(reinterpret_cast<const char*>(block.wire()), block.size());
+    std::string expected(reinterpret_cast<const char*>(block.data()), block.size());
     BOOST_CHECK(output.is_equal(expected));
   }
 
@@ -94,7 +94,7 @@
   checkOutput(output_test_stream& output, const lp::Nack& nack)
   {
     const Block& block = nack.getHeader().wireEncode();
-    std::string expected(reinterpret_cast<const char*>(block.wire()), block.size());
+    std::string expected(reinterpret_cast<const char*>(block.data()), block.size());
     BOOST_CHECK(output.is_equal(expected));
   }
 };
@@ -252,7 +252,7 @@
 {
   auto options = makeDefaultOptions();
   options.interestLifetime = 1_s;
-  options.timeout = nullopt;
+  options.timeout = std::nullopt;
   initialize(options);
 
   BOOST_CHECK_EQUAL(face.sentInterests.size(), 0);
diff --git a/tools/dissect/dissector.cpp b/tools/dissect/dissector.cpp
index c612352..4a64f18 100644
--- a/tools/dissect/dissector.cpp
+++ b/tools/dissect/dissector.cpp
@@ -27,7 +27,7 @@
 #include <map>
 
 #include <ndn-cxx/encoding/tlv.hpp>
-#include <ndn-cxx/name-component.hpp>
+#include <ndn-cxx/util/string-helper.hpp>
 
 namespace ndn::dissect {
 
@@ -168,7 +168,7 @@
   const auto& elements = block.elements();
   if (elements.empty()) {
     m_out << " [[";
-    name::Component(block.value(), block.value_size()).toUri(m_out);
+    escape(m_out, reinterpret_cast<const char*>(block.value()), block.value_size());
     m_out << "]]";
   }
   m_out << "\n";
diff --git a/tools/dump/ndndump.hpp b/tools/dump/ndndump.hpp
index 9d786e7..83b0710 100644
--- a/tools/dump/ndndump.hpp
+++ b/tools/dump/ndndump.hpp
@@ -105,7 +105,7 @@
   std::string interface;
   std::string inputFile;
   std::string pcapFilter{getDefaultPcapFilter()};
-  optional<std::regex> nameFilter;
+  std::optional<std::regex> nameFilter;
   bool wantPromisc = true;
   bool wantTimestamp = true;
   bool wantVerbose = false;
diff --git a/tools/peek/ndnpeek/ndnpeek.cpp b/tools/peek/ndnpeek/ndnpeek.cpp
index d58b92e..3fb540f 100644
--- a/tools/peek/ndnpeek/ndnpeek.cpp
+++ b/tools/peek/ndnpeek/ndnpeek.cpp
@@ -64,7 +64,9 @@
   interest.setMustBeFresh(m_options.mustBeFresh);
   interest.setForwardingHint(m_options.forwardingHint);
   interest.setInterestLifetime(m_options.interestLifetime);
-  interest.setHopLimit(m_options.hopLimit);
+  if (m_options.hopLimit) {
+    interest.setHopLimit(*m_options.hopLimit);
+  }
   if (m_options.applicationParameters) {
     interest.setApplicationParameters(m_options.applicationParameters);
   }
@@ -76,6 +78,12 @@
   return interest;
 }
 
+static void
+writeToCout(span<const uint8_t> bytes)
+{
+  std::cout.write(reinterpret_cast<const char*>(bytes.data()), bytes.size());
+}
+
 void
 NdnPeek::onData(const Data& data)
 {
@@ -89,12 +97,10 @@
   }
 
   if (m_options.wantPayloadOnly) {
-    const Block& block = data.getContent();
-    std::cout.write(reinterpret_cast<const char*>(block.value()), block.value_size());
+    writeToCout(data.getContent().value_bytes());
   }
   else {
-    const Block& block = data.wireEncode();
-    std::cout.write(reinterpret_cast<const char*>(block.wire()), block.size());
+    writeToCout(data.wireEncode());
   }
 }
 
@@ -104,7 +110,7 @@
   m_result = Result::NACK;
   m_timeoutEvent.cancel();
 
-  lp::NackHeader header = nack.getHeader();
+  const auto& header = nack.getHeader();
   if (m_options.isVerbose) {
     std::cerr << "NACK: " << header.getReason() << "\nRTT: "
               << time::duration_cast<time::milliseconds>(time::steady_clock::now() - m_sendTime).count()
@@ -115,8 +121,7 @@
     std::cout << header.getReason() << std::endl;
   }
   else {
-    const Block& block = header.wireEncode();
-    std::cout.write(reinterpret_cast<const char*>(block.wire()), block.size());
+    writeToCout(header.wireEncode());
   }
 }
 
diff --git a/tools/peek/ndnpeek/ndnpeek.hpp b/tools/peek/ndnpeek/ndnpeek.hpp
index eba1b1f..f7f246b 100644
--- a/tools/peek/ndnpeek/ndnpeek.hpp
+++ b/tools/peek/ndnpeek/ndnpeek.hpp
@@ -48,13 +48,13 @@
   bool mustBeFresh = false;
   std::vector<Name> forwardingHint;
   time::milliseconds interestLifetime = DEFAULT_INTEREST_LIFETIME;
-  optional<uint8_t> hopLimit;
+  std::optional<uint8_t> hopLimit;
   shared_ptr<Buffer> applicationParameters;
 
   // program behavior options
   bool isVerbose = false;
   bool wantPayloadOnly = false;
-  optional<time::milliseconds> timeout;
+  std::optional<time::milliseconds> timeout;
 };
 
 class NdnPeek : noncopyable
diff --git a/tools/peek/ndnpoke/ndnpoke.hpp b/tools/peek/ndnpoke/ndnpoke.hpp
index 16a3795..a3cd393 100644
--- a/tools/peek/ndnpoke/ndnpoke.hpp
+++ b/tools/peek/ndnpoke/ndnpoke.hpp
@@ -49,7 +49,7 @@
   // program behavior options
   bool isVerbose = false;
   bool wantUnsolicited = false;
-  optional<time::milliseconds> timeout;
+  std::optional<time::milliseconds> timeout;
 };
 
 class NdnPoke : noncopyable
diff --git a/wscript b/wscript
index 92b710c..0bfb7f6 100644
--- a/wscript
+++ b/wscript
@@ -27,8 +27,9 @@
 
     conf.env.WITH_TESTS = conf.options.with_tests
 
-    conf.check_cfg(package='libndn-cxx', args=['--cflags', '--libs'], uselib_store='NDN_CXX',
-                   pkg_config_path=os.environ.get('PKG_CONFIG_PATH', '%s/pkgconfig' % conf.env.LIBDIR))
+    pkg_config_path = os.environ.get('PKG_CONFIG_PATH', f'{conf.env.LIBDIR}/pkgconfig')
+    conf.check_cfg(package='libndn-cxx', args=['libndn-cxx >= 0.8.0', '--cflags', '--libs'],
+                   uselib_store='NDN_CXX', pkg_config_path=pkg_config_path)
 
     boost_libs = ['system', 'program_options', 'filesystem']
     if conf.env.WITH_TESTS:
