diff --git a/tests/unit/tcp-bulk-insert-handle.cpp b/tests/unit/tcp-bulk-insert-handle.cpp
index f35a42f..48ec17d 100644
--- a/tests/unit/tcp-bulk-insert-handle.cpp
+++ b/tests/unit/tcp-bulk-insert-handle.cpp
@@ -1,6 +1,6 @@
 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
 /**
- * Copyright (c) 2014-2017,  Regents of the University of California.
+ * Copyright (c) 2014-2018,  Regents of the University of California.
  *
  * This file is part of NDN repo-ng (Next generation of NDN repository).
  * See AUTHORS.md for complete list of repo-ng authors and contributors.
@@ -57,17 +57,16 @@
     ip::tcp::endpoint serverEndpoint = *endpoint;
 
     socket.async_connect(serverEndpoint,
-                         bind(&TcpClient::onSuccessfullConnect, this, _1));
+                         std::bind(&TcpClient::onSuccessfullConnect, this, _1));
   }
 
   virtual void
   onSuccessfullConnect(const boost::system::error_code& error)
   {
-    if (error)
-      {
-        BOOST_FAIL("TCP connection aborted");
-        return;
-      }
+    if (error) {
+      BOOST_FAIL("TCP connection aborted");
+      return;
+    }
   }
 
 public:
@@ -86,7 +85,7 @@
     , bulkInserter(ioService, *handle)
   {
     guardEvent = scheduler.scheduleEvent(ndn::time::seconds(2),
-                                         bind(&TcpBulkInsertFixture::fail, this, "Test timed out"));
+                                         std::bind(&TcpBulkInsertFixture::fail, this, "Test timed out"));
   }
 
   virtual void
@@ -102,15 +101,12 @@
     // described in http://www.boost.org/doc/libs/1_48_0/doc/html/boost_asio/overview/implementation.html,
     // scatter-gather is limited to at most `min(64,IOV_MAX)` buffers to be transmitted
     // in a single operation
-    for (typename Dataset::DataContainer::iterator i = this->data.begin();
-         i != this->data.end(); ++i) {
+    for (auto i = this->data.begin(); i != this->data.end(); ++i) {
 
-      socket.async_send(boost::asio::buffer((*i)->wireEncode().wire(),  (*i)->wireEncode().size()),
-                        bind(&TcpBulkInsertFixture::onSendFinished, this, _1, false));
+      socket.async_send(boost::asio::buffer((*i)->wireEncode().wire(), (*i)->wireEncode().size()),
+                        std::bind(&TcpBulkInsertFixture::onSendFinished, this, _1, false));
     }
-
-    socket.async_send(boost::asio::buffer(static_cast<const uint8_t*>(0), 0),
-                      bind(&TcpBulkInsertFixture::onSendFinished, this, _1, true));
+    onSendFinished(error, true);
   }
 
   void
@@ -127,7 +123,7 @@
       // In case there are some outstanding handlers
       // ioService.post(bind(&TcpBulkInsertFixture::stop, this));
       scheduler.scheduleEvent(ndn::time::seconds(1),
-                              bind(&TcpBulkInsertFixture::stop, this));
+                              std::bind(&TcpBulkInsertFixture::stop, this));
     }
   }
 
@@ -170,9 +166,8 @@
   this->ioService.run();
 
   // Read (all items should exist)
-  for (typename T::InterestContainer::iterator i = this->interests.begin();
-       i != this->interests.end(); ++i) {
-      BOOST_CHECK_EQUAL(*this->handle->readData(i->first), *i->second);
+  for (auto i = this->interests.begin(); i != this->interests.end(); ++i) {
+    BOOST_CHECK_EQUAL(*this->handle->readData(i->first), *i->second);
   }
 }
 
