diff --git a/daemon/face/face.cpp b/daemon/face/face.cpp
index 2b107a7..06bae23 100644
--- a/daemon/face/face.cpp
+++ b/daemon/face/face.cpp
@@ -128,22 +128,14 @@
 Face::copyStatusTo(FaceTraits& traits) const
 {
   traits.setFaceId(getId())
-    .setRemoteUri(getRemoteUri().toString())
-    .setLocalUri(getLocalUri().toString());
-
-  if (isLocal()) {
-    traits.setFaceScope(ndn::nfd::FACE_SCOPE_LOCAL);
-  }
-  else {
-    traits.setFaceScope(ndn::nfd::FACE_SCOPE_NON_LOCAL);
-  }
-
-  if (isOnDemand()) {
-    traits.setFacePersistency(ndn::nfd::FACE_PERSISTENCY_ON_DEMAND);
-  }
-  else {
-    traits.setFacePersistency(ndn::nfd::FACE_PERSISTENCY_PERSISTENT);
-  }
+        .setRemoteUri(getRemoteUri().toString())
+        .setLocalUri(getLocalUri().toString())
+        .setFaceScope(isLocal() ? ndn::nfd::FACE_SCOPE_LOCAL
+                                : ndn::nfd::FACE_SCOPE_NON_LOCAL)
+        .setFacePersistency(isOnDemand() ? ndn::nfd::FACE_PERSISTENCY_ON_DEMAND
+                                         : ndn::nfd::FACE_PERSISTENCY_PERSISTENT)
+        .setLinkType(isMultiAccess() ? ndn::nfd::LINK_TYPE_MULTI_ACCESS
+                                     : ndn::nfd::LINK_TYPE_POINT_TO_POINT);
 }
 
 template void
@@ -156,11 +148,11 @@
 Face::getFaceStatus() const
 {
   ndn::nfd::FaceStatus status;
-  copyStatusTo(status);
 
+  copyStatusTo(status);
   this->getCounters().copyTo(status);
 
   return status;
 }
 
-} //namespace nfd
+} // namespace nfd
diff --git a/daemon/face/udp-face.cpp b/daemon/face/udp-face.cpp
index 8962f0d..27c78b3 100644
--- a/daemon/face/udp-face.cpp
+++ b/daemon/face/udp-face.cpp
@@ -81,20 +81,19 @@
 ndn::nfd::FaceStatus
 UdpFace::getFaceStatus() const
 {
-  auto status = Face::getFaceStatus();
+  auto status = DatagramFace::getFaceStatus();
 
   if (isOnDemand()) {
-    time::milliseconds left = m_idleTimeout - time::duration_cast<time::milliseconds>(
-      time::steady_clock::now() - m_lastIdleCheck);
+    time::milliseconds left = m_idleTimeout;
+    left -= time::duration_cast<time::milliseconds>(time::steady_clock::now() - m_lastIdleCheck);
+
     if (left < time::milliseconds::zero())
       left = time::milliseconds::zero();
 
-    if (hasBeenUsedRecently()) {
-      status.setExpirationPeriod(left + m_idleTimeout);
-    }
-    else {
-      status.setExpirationPeriod(left);
-    }
+    if (hasBeenUsedRecently())
+      left += m_idleTimeout;
+
+    status.setExpirationPeriod(left);
   }
 
   return status;
