diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index 3c11372..4dd6b72 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -38,7 +38,6 @@
 constexpr static const size_t maxFruSdrNameSize = 16;
 static constexpr int sensorMapUpdatePeriod = 2;
 using SensorMap = std::map<std::string, std::map<std::string, DbusVariant>>;
-namespace variant_ns = sdbusplus::message::variant_ns;
 
 using ManagedObjectSensor =
     std::map<sdbusplus::message::object_path,
@@ -216,10 +215,8 @@
             continue;
         }
 
-        uint8_t fruBus =
-            sdbusplus::message::variant_ns::get<uint32_t>(busFind->second);
-        uint8_t fruAddr =
-            sdbusplus::message::variant_ns::get<uint32_t>(addrFind->second);
+        uint8_t fruBus = std::get<uint32_t>(busFind->second);
+        uint8_t fruAddr = std::get<uint32_t>(addrFind->second);
 
         uint8_t fruHash = 0;
         // Need to revise this strategy for dev id
@@ -481,13 +478,11 @@
                          {
                              return false;
                          }
-                         if (sdbusplus::message::variant_ns::get<uint32_t>(
-                                 findBus->second) != bus)
+                         if (std::get<uint32_t>(findBus->second) != bus)
                          {
                              return false;
                          }
-                         if (sdbusplus::message::variant_ns::get<uint32_t>(
-                                 findAddress->second) != address)
+                         if (std::get<uint32_t>(findAddress->second) != address)
                          {
                              return false;
                          }
@@ -502,13 +497,11 @@
     auto findBoardName = fruData->find("PRODUCT_PRODUCT_NAME");
     if (findProductName != fruData->end())
     {
-        name = sdbusplus::message::variant_ns::get<std::string>(
-            findProductName->second);
+        name = std::get<std::string>(findProductName->second);
     }
     else if (findBoardName != fruData->end())
     {
-        name = sdbusplus::message::variant_ns::get<std::string>(
-            findBoardName->second);
+        name = std::get<std::string>(findBoardName->second);
     }
     else
     {
@@ -715,12 +708,12 @@
     double min = -127;
     if (maxObject != sensorObject->second.end())
     {
-        max = variant_ns::visit(VariantToDoubleVisitor(), maxObject->second);
+        max = std::visit(VariantToDoubleVisitor(), maxObject->second);
     }
 
     if (minObject != sensorObject->second.end())
     {
-        min = variant_ns::visit(VariantToDoubleVisitor(), minObject->second);
+        min = std::visit(VariantToDoubleVisitor(), minObject->second);
     }
 
     int16_t mValue;
