diff --git a/src/mgmt/nfd/channel-status.cpp b/src/mgmt/nfd/channel-status.cpp
index f3a7e2b..e6e53f4 100644
--- a/src/mgmt/nfd/channel-status.cpp
+++ b/src/mgmt/nfd/channel-status.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -20,7 +20,7 @@
  */
 
 #include "channel-status.hpp"
-#include "encoding/encoding-buffer.hpp"
+#include "encoding/block-helpers.hpp"
 #include "encoding/tlv-nfd.hpp"
 #include "util/concepts.hpp"
 
@@ -41,10 +41,7 @@
 ChannelStatus::wireEncode(EncodingImpl<TAG>& encoder) const
 {
   size_t totalLength = 0;
-
-  totalLength += encoder.prependByteArrayBlock(tlv::nfd::LocalUri,
-                 reinterpret_cast<const uint8_t*>(m_localUri.data()), m_localUri.size());
-
+  totalLength += prependStringBlock(encoder, tlv::nfd::LocalUri, m_localUri);
   totalLength += encoder.prependVarNumber(totalLength);
   totalLength += encoder.prependVarNumber(tlv::nfd::ChannelStatus);
   return totalLength;
@@ -83,7 +80,7 @@
   Block::element_const_iterator val = m_wire.elements_begin();
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) {
-    m_localUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_localUri = readString(*val);
     ++val;
   }
   else {
diff --git a/src/mgmt/nfd/control-parameters.cpp b/src/mgmt/nfd/control-parameters.cpp
index bc18f13..465482f 100644
--- a/src/mgmt/nfd/control-parameters.cpp
+++ b/src/mgmt/nfd/control-parameters.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -20,8 +20,8 @@
  */
 
 #include "control-parameters.hpp"
-#include "encoding/tlv-nfd.hpp"
 #include "encoding/block-helpers.hpp"
+#include "encoding/tlv-nfd.hpp"
 #include "util/concepts.hpp"
 #include "util/string-helper.hpp"
 
@@ -75,18 +75,10 @@
     totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Origin, m_origin);
   }
   if (this->hasLocalUri()) {
-    size_t valLength = encoder.prependByteArray(
-                       reinterpret_cast<const uint8_t*>(m_localUri.c_str()), m_localUri.size());
-    totalLength += valLength;
-    totalLength += encoder.prependVarNumber(valLength);
-    totalLength += encoder.prependVarNumber(tlv::nfd::LocalUri);
+    totalLength += prependStringBlock(encoder, tlv::nfd::LocalUri, m_localUri);
   }
   if (this->hasUri()) {
-    size_t valLength = encoder.prependByteArray(
-                       reinterpret_cast<const uint8_t*>(m_uri.c_str()), m_uri.size());
-    totalLength += valLength;
-    totalLength += encoder.prependVarNumber(valLength);
-    totalLength += encoder.prependVarNumber(tlv::nfd::Uri);
+    totalLength += prependStringBlock(encoder, tlv::nfd::Uri, m_uri);
   }
   if (this->hasFaceId()) {
     totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FaceId, m_faceId);
@@ -141,43 +133,43 @@
   val = m_wire.find(tlv::nfd::FaceId);
   m_hasFields[CONTROL_PARAMETER_FACE_ID] = val != m_wire.elements_end();
   if (this->hasFaceId()) {
-    m_faceId = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_faceId = readNonNegativeInteger(*val);
   }
 
   val = m_wire.find(tlv::nfd::Uri);
   m_hasFields[CONTROL_PARAMETER_URI] = val != m_wire.elements_end();
   if (this->hasUri()) {
-    m_uri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_uri = readString(*val);
   }
 
   val = m_wire.find(tlv::nfd::LocalUri);
   m_hasFields[CONTROL_PARAMETER_LOCAL_URI] = val != m_wire.elements_end();
   if (this->hasLocalUri()) {
-    m_localUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_localUri = readString(*val);
   }
 
   val = m_wire.find(tlv::nfd::Origin);
   m_hasFields[CONTROL_PARAMETER_ORIGIN] = val != m_wire.elements_end();
   if (this->hasOrigin()) {
-    m_origin = static_cast<RouteOrigin>(readNonNegativeInteger(*val));
+    m_origin = readNonNegativeIntegerAs<RouteOrigin>(*val);
   }
 
   val = m_wire.find(tlv::nfd::Cost);
   m_hasFields[CONTROL_PARAMETER_COST] = val != m_wire.elements_end();
   if (this->hasCost()) {
-    m_cost = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_cost = readNonNegativeInteger(*val);
   }
 
   val = m_wire.find(tlv::nfd::Flags);
   m_hasFields[CONTROL_PARAMETER_FLAGS] = val != m_wire.elements_end();
   if (this->hasFlags()) {
-    m_flags = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_flags = readNonNegativeInteger(*val);
   }
 
   val = m_wire.find(tlv::nfd::Mask);
   m_hasFields[CONTROL_PARAMETER_MASK] = val != m_wire.elements_end();
   if (this->hasMask()) {
-    m_mask = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_mask = readNonNegativeInteger(*val);
   }
 
   val = m_wire.find(tlv::nfd::Strategy);
@@ -201,7 +193,7 @@
   val = m_wire.find(tlv::nfd::FacePersistency);
   m_hasFields[CONTROL_PARAMETER_FACE_PERSISTENCY] = val != m_wire.elements_end();
   if (this->hasFacePersistency()) {
-    m_facePersistency = static_cast<FacePersistency>(readNonNegativeInteger(*val));
+    m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
   }
 }
 
diff --git a/src/mgmt/nfd/face-event-notification.cpp b/src/mgmt/nfd/face-event-notification.cpp
index 888fe61..79a94f2 100644
--- a/src/mgmt/nfd/face-event-notification.cpp
+++ b/src/mgmt/nfd/face-event-notification.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -47,22 +47,14 @@
 {
   size_t totalLength = 0;
 
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::Flags, m_flags);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::LinkType, m_linkType);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::FacePersistency, m_facePersistency);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::FaceScope, m_faceScope);
-  totalLength += encoder.prependByteArrayBlock(tlv::nfd::LocalUri,
-                 reinterpret_cast<const uint8_t*>(m_localUri.data()), m_localUri.size());
-  totalLength += encoder.prependByteArrayBlock(tlv::nfd::Uri,
-                 reinterpret_cast<const uint8_t*>(m_remoteUri.data()), m_remoteUri.size());
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::FaceId, m_faceId);
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::FaceEventKind, m_kind);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::Flags, m_flags);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::LinkType, m_linkType);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FacePersistency, m_facePersistency);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FaceScope, m_faceScope);
+  totalLength += prependStringBlock(encoder, tlv::nfd::LocalUri, m_localUri);
+  totalLength += prependStringBlock(encoder, tlv::nfd::Uri, m_remoteUri);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FaceId, m_faceId);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FaceEventKind, m_kind);
 
   totalLength += encoder.prependVarNumber(totalLength);
   totalLength += encoder.prependVarNumber(tlv::nfd::FaceEventNotification);
@@ -102,7 +94,7 @@
   Block::element_const_iterator val = m_wire.elements_begin();
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceEventKind) {
-    m_kind = static_cast<FaceEventKind>(readNonNegativeInteger(*val));
+    m_kind = readNonNegativeIntegerAs<FaceEventKind>(*val);
     ++val;
   }
   else {
@@ -118,7 +110,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Uri) {
-    m_remoteUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_remoteUri = readString(*val);
     ++val;
   }
   else {
@@ -126,7 +118,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) {
-    m_localUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_localUri = readString(*val);
     ++val;
   }
   else {
@@ -134,7 +126,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceScope) {
-    m_faceScope = static_cast<FaceScope>(readNonNegativeInteger(*val));
+    m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
     ++val;
   }
   else {
@@ -142,7 +134,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FacePersistency) {
-    m_facePersistency = static_cast<FacePersistency>(readNonNegativeInteger(*val));
+    m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
     ++val;
   }
   else {
@@ -150,7 +142,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LinkType) {
-    m_linkType = static_cast<LinkType>(readNonNegativeInteger(*val));
+    m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
     ++val;
   }
   else {
diff --git a/src/mgmt/nfd/face-query-filter.cpp b/src/mgmt/nfd/face-query-filter.cpp
index 36a1206..6bde1d4 100644
--- a/src/mgmt/nfd/face-query-filter.cpp
+++ b/src/mgmt/nfd/face-query-filter.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -20,8 +20,8 @@
  */
 
 #include "face-query-filter.hpp"
-#include "encoding/tlv-nfd.hpp"
 #include "encoding/block-helpers.hpp"
+#include "encoding/tlv-nfd.hpp"
 #include "util/concepts.hpp"
 
 namespace ndn {
@@ -62,18 +62,15 @@
   }
 
   if (hasLocalUri()) {
-    totalLength += encoder.prependByteArrayBlock(tlv::nfd::LocalUri,
-                   reinterpret_cast<const uint8_t*>(m_localUri.data()), m_localUri.size());
+    totalLength += prependStringBlock(encoder, tlv::nfd::LocalUri, m_localUri);
   }
 
   if (hasRemoteUri()) {
-    totalLength += encoder.prependByteArrayBlock(tlv::nfd::Uri,
-                   reinterpret_cast<const uint8_t*>(m_remoteUri.data()), m_remoteUri.size());
+    totalLength += prependStringBlock(encoder, tlv::nfd::Uri, m_remoteUri);
   }
 
   if (hasUriScheme()) {
-    totalLength += encoder.prependByteArrayBlock(tlv::nfd::UriScheme,
-                   reinterpret_cast<const uint8_t*>(m_uriScheme.data()), m_uriScheme.size());
+    totalLength += prependStringBlock(encoder, tlv::nfd::UriScheme, m_uriScheme);
   }
 
   if (m_faceId) {
@@ -129,7 +126,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::UriScheme) {
-    m_uriScheme.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_uriScheme = readString(*val);
     ++val;
   }
   else {
@@ -137,7 +134,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Uri) {
-    m_remoteUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_remoteUri = readString(*val);
     ++val;
   }
   else {
@@ -145,7 +142,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) {
-    m_localUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_localUri = readString(*val);
     ++val;
   }
   else {
@@ -153,7 +150,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceScope) {
-    m_faceScope = static_cast<FaceScope>(readNonNegativeInteger(*val));
+    m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
     ++val;
   }
   else {
@@ -161,7 +158,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FacePersistency) {
-    m_facePersistency = static_cast<FacePersistency>(readNonNegativeInteger(*val));
+    m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
     ++val;
   }
   else {
@@ -169,7 +166,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LinkType) {
-    m_linkType = static_cast<LinkType>(readNonNegativeInteger(*val));
+    m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
     ++val;
   }
   else {
diff --git a/src/mgmt/nfd/face-status.cpp b/src/mgmt/nfd/face-status.cpp
index 3361d99..1cfc741 100644
--- a/src/mgmt/nfd/face-status.cpp
+++ b/src/mgmt/nfd/face-status.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -67,15 +67,12 @@
   totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FacePersistency, m_facePersistency);
   totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FaceScope, m_faceScope);
   if (m_expirationPeriod) {
-    totalLength += prependNonNegativeIntegerBlock(encoder,
-                   tlv::nfd::ExpirationPeriod, static_cast<uint64_t>(m_expirationPeriod->count()));
+    totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::ExpirationPeriod,
+                                                  m_expirationPeriod->count());
   }
-  totalLength += encoder.prependByteArrayBlock(tlv::nfd::LocalUri,
-                 reinterpret_cast<const uint8_t*>(m_localUri.data()), m_localUri.size());
-  totalLength += encoder.prependByteArrayBlock(tlv::nfd::Uri,
-                 reinterpret_cast<const uint8_t*>(m_remoteUri.data()), m_remoteUri.size());
-  totalLength += prependNonNegativeIntegerBlock(encoder,
-                 tlv::nfd::FaceId, m_faceId);
+  totalLength += prependStringBlock(encoder, tlv::nfd::LocalUri, m_localUri);
+  totalLength += prependStringBlock(encoder, tlv::nfd::Uri, m_remoteUri);
+  totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::FaceId, m_faceId);
 
   totalLength += encoder.prependVarNumber(totalLength);
   totalLength += encoder.prependVarNumber(tlv::nfd::FaceStatus);
@@ -123,7 +120,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Uri) {
-    m_remoteUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_remoteUri = readString(*val);
     ++val;
   }
   else {
@@ -131,7 +128,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LocalUri) {
-    m_localUri.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_localUri = readString(*val);
     ++val;
   }
   else {
@@ -147,7 +144,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FaceScope) {
-    m_faceScope = static_cast<FaceScope>(readNonNegativeInteger(*val));
+    m_faceScope = readNonNegativeIntegerAs<FaceScope>(*val);
     ++val;
   }
   else {
@@ -155,7 +152,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::FacePersistency) {
-    m_facePersistency = static_cast<FacePersistency>(readNonNegativeInteger(*val));
+    m_facePersistency = readNonNegativeIntegerAs<FacePersistency>(*val);
     ++val;
   }
   else {
@@ -163,7 +160,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::LinkType) {
-    m_linkType = static_cast<LinkType>(readNonNegativeInteger(*val));
+    m_linkType = readNonNegativeIntegerAs<LinkType>(*val);
     ++val;
   }
   else {
diff --git a/src/mgmt/nfd/forwarder-status.cpp b/src/mgmt/nfd/forwarder-status.cpp
index 06c8f1f..50eac63 100644
--- a/src/mgmt/nfd/forwarder-status.cpp
+++ b/src/mgmt/nfd/forwarder-status.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -71,9 +71,7 @@
                                                 time::toUnixTimestamp(m_currentTimestamp).count());
   totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::StartTimestamp,
                                                 time::toUnixTimestamp(m_startTimestamp).count());
-  totalLength += encoder.prependByteArrayBlock(tlv::nfd::NfdVersion,
-                                               reinterpret_cast<const uint8_t*>(m_nfdVersion.data()),
-                                               m_nfdVersion.size());
+  totalLength += prependStringBlock(encoder, tlv::nfd::NfdVersion, m_nfdVersion);
 
   totalLength += encoder.prependVarNumber(totalLength);
   totalLength += encoder.prependVarNumber(tlv::Content);
@@ -113,7 +111,7 @@
   Block::element_const_iterator val = m_wire.elements_begin();
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NfdVersion) {
-    m_nfdVersion.assign(reinterpret_cast<const char*>(val->value()), val->value_size());
+    m_nfdVersion = readString(*val);
     ++val;
   }
   else {
@@ -137,7 +135,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NNameTreeEntries) {
-    m_nNameTreeEntries = static_cast<size_t>(readNonNegativeInteger(*val));
+    m_nNameTreeEntries = readNonNegativeIntegerAs<size_t>(*val);
     ++val;
   }
   else {
@@ -145,7 +143,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NFibEntries) {
-    m_nFibEntries = static_cast<size_t>(readNonNegativeInteger(*val));
+    m_nFibEntries = readNonNegativeIntegerAs<size_t>(*val);
     ++val;
   }
   else {
@@ -153,7 +151,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NPitEntries) {
-    m_nPitEntries = static_cast<size_t>(readNonNegativeInteger(*val));
+    m_nPitEntries = readNonNegativeIntegerAs<size_t>(*val);
     ++val;
   }
   else {
@@ -161,7 +159,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NMeasurementsEntries) {
-    m_nMeasurementsEntries = static_cast<size_t>(readNonNegativeInteger(*val));
+    m_nMeasurementsEntries = readNonNegativeIntegerAs<size_t>(*val);
     ++val;
   }
   else {
@@ -169,7 +167,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NCsEntries) {
-    m_nCsEntries = static_cast<size_t>(readNonNegativeInteger(*val));
+    m_nCsEntries = readNonNegativeIntegerAs<size_t>(*val);
     ++val;
   }
   else {
@@ -177,7 +175,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInInterests) {
-    m_nInInterests = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_nInInterests = readNonNegativeInteger(*val);
     ++val;
   }
   else {
@@ -185,7 +183,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInData) {
-    m_nInData = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_nInData = readNonNegativeInteger(*val);
     ++val;
   }
   else {
@@ -193,7 +191,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NInNacks) {
-    m_nInNacks = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_nInNacks = readNonNegativeInteger(*val);
     ++val;
   }
   else {
@@ -201,7 +199,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutInterests) {
-    m_nOutInterests = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_nOutInterests = readNonNegativeInteger(*val);
     ++val;
   }
   else {
@@ -209,7 +207,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutData) {
-    m_nOutData = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_nOutData = readNonNegativeInteger(*val);
     ++val;
   }
   else {
@@ -217,7 +215,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::NOutNacks) {
-    m_nOutNacks = static_cast<uint64_t>(readNonNegativeInteger(*val));
+    m_nOutNacks = readNonNegativeInteger(*val);
     ++val;
   }
   else {
diff --git a/src/mgmt/nfd/rib-entry.cpp b/src/mgmt/nfd/rib-entry.cpp
index 619fd5e..475af15 100644
--- a/src/mgmt/nfd/rib-entry.cpp
+++ b/src/mgmt/nfd/rib-entry.cpp
@@ -1,5 +1,5 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
  * Copyright (c) 2013-2017 Regents of the University of California.
  *
  * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -159,7 +159,7 @@
   }
 
   if (val != m_wire.elements_end() && val->type() == tlv::nfd::Origin) {
-    m_origin = static_cast<RouteOrigin>(readNonNegativeInteger(*val));
+    m_origin = readNonNegativeIntegerAs<RouteOrigin>(*val);
     ++val;
   }
   else {
