diff --git a/platform-mc/terminus_manager.cpp b/platform-mc/terminus_manager.cpp
index bd77fe6..d90b6cf 100644
--- a/platform-mc/terminus_manager.cpp
+++ b/platform-mc/terminus_manager.cpp
@@ -464,12 +464,7 @@
 
 exec::task<int> TerminusManager::getTidOverMctp(mctp_eid_t eid, pldm_tid_t* tid)
 {
-    auto instanceIdResult = pldm::utils::getInstanceId(instanceIdDb.next(eid));
-    if (!instanceIdResult)
-    {
-        co_return PLDM_ERROR;
-    }
-    auto instanceId = instanceIdResult.value();
+    auto instanceId = instanceIdDb.next(eid);
     Request request(sizeof(pldm_msg_hdr));
     auto requestMsg = new (request.data()) pldm_msg;
     auto rc = encode_get_tid_req(instanceId, requestMsg);
@@ -515,12 +510,7 @@
 
 exec::task<int> TerminusManager::setTidOverMctp(mctp_eid_t eid, pldm_tid_t tid)
 {
-    auto instanceIdResult = pldm::utils::getInstanceId(instanceIdDb.next(eid));
-    if (!instanceIdResult)
-    {
-        co_return PLDM_ERROR;
-    }
-    auto instanceId = instanceIdResult.value();
+    auto instanceId = instanceIdDb.next(eid);
     Request request(sizeof(pldm_msg_hdr) + sizeof(pldm_set_tid_req));
     auto requestMsg = new (request.data()) pldm_msg;
     auto rc = encode_set_tid_req(instanceId, tid, requestMsg);
@@ -694,12 +684,7 @@
 
     auto eid = std::get<0>(mctpInfo.value());
     auto requestMsg = new (request.data()) pldm_msg;
-    auto instanceIdResult = pldm::utils::getInstanceId(instanceIdDb.next(eid));
-    if (!instanceIdResult)
-    {
-        co_return PLDM_ERROR;
-    }
-    requestMsg->hdr.instance_id = instanceIdResult.value();
+    requestMsg->hdr.instance_id = instanceIdDb.next(eid);
     auto rc = co_await sendRecvPldmMsgOverMctp(eid, request, responseMsg,
                                                responseLen);
 
