Replace std::bind with lambda to improve readability.