diff --git a/.env.ibm b/.env.ibm
index 39cc416..cbfe7bb 100644
--- a/.env.ibm
+++ b/.env.ibm
@@ -2,7 +2,6 @@
 VUE_APP_ENV_NAME=ibm
 VUE_APP_COMPANY_NAME="IBM"
 VUE_APP_GUI_NAME="BMC System Management"
-VUE_APP_FAN_DATA_FROM_THERMAL_SUBSYSTEM="true"
 CUSTOM_STYLES=true
 CUSTOM_APP_NAV=true
 CUSTOM_ROUTER=true
diff --git a/.env.intel b/.env.intel
index c7dea36..382e7fb 100644
--- a/.env.intel
+++ b/.env.intel
@@ -8,8 +8,7 @@
 VUE_APP_VIRTUAL_MEDIA_LIST_ENABLED="true"
 VUE_APP_EVENT_LOGS_DELETE_BUTTON_DISABLED="true"
 VUE_APP_EVENT_LOGS_TOGGLE_BUTTON_DISABLED="true"
-VUE_APP_FAN_DATA_FROM_THERMAL_SUBSYSTEM="true"
 CUSTOM_STYLES="true"
 CUSTOM_APP_NAV="true"
 CUSTOM_STORE="true"
-CUSTOM_ROUTER="true"
\ No newline at end of file
+CUSTOM_ROUTER="true"
diff --git a/src/store/modules/HardwareStatus/FanStore.js b/src/store/modules/HardwareStatus/FanStore.js
index 104f845..202a432 100644
--- a/src/store/modules/HardwareStatus/FanStore.js
+++ b/src/store/modules/HardwareStatus/FanStore.js
@@ -11,49 +11,24 @@
   mutations: {
     setFanInfo: (state, data) => {
       state.fans = data.map((fan) => {
-        const ThermalSubsystem =
-          process.env.VUE_APP_FAN_DATA_FROM_THERMAL_SUBSYSTEM === 'true'
-            ? true
-            : false;
-        if (ThermalSubsystem) {
-          const {
-            Id,
-            Name,
-            PartNumber,
-            SerialNumber,
-            SpeedPercent = {},
-            Status = {},
-          } = fan;
-          return {
-            id: Id,
-            health: Status.Health,
-            name: Name,
-            speed: SpeedPercent.Reading,
-            statusState: Status.State,
-            healthRollup: Status.HealthRollup,
-            partNumber: PartNumber,
-            serialNumber: SerialNumber,
-          };
-        } else {
-          const {
-            MemberId,
-            Name,
-            Reading,
-            Status = {},
-            PartNumber,
-            SerialNumber,
-          } = fan;
-          return {
-            id: MemberId,
-            health: Status.Health,
-            partNumber: PartNumber,
-            serialNumber: SerialNumber,
-            healthRollup: Status.HealthRollup,
-            name: Name,
-            speed: Reading,
-            statusState: Status.State,
-          };
-        }
+        const {
+          Id,
+          Name,
+          PartNumber,
+          SerialNumber,
+          SpeedPercent = {},
+          Status = {},
+        } = fan;
+        return {
+          id: Id,
+          health: Status.Health,
+          name: Name,
+          speed: SpeedPercent.Reading,
+          statusState: Status.State,
+          healthRollup: Status.HealthRollup,
+          partNumber: PartNumber,
+          serialNumber: SerialNumber,
+        };
       });
     },
   },
@@ -79,35 +54,22 @@
         .catch((error) => console.log(error));
     },
     async getChassisFans(_, chassis) {
-      const ThermalSubsystem =
-        process.env.VUE_APP_FAN_DATA_FROM_THERMAL_SUBSYSTEM === 'true'
-          ? true
-          : false;
-      if (ThermalSubsystem) {
-        return await api
-          .get(chassis.ThermalSubsystem['@odata.id'])
-          .then((response) => {
-            return api.get(`${response.data.Fans['@odata.id']}`);
-          })
-          .then(({ data: { Members } }) => {
-            const promises = Members.map((member) =>
-              api.get(member['@odata.id']),
-            );
-            return api.all(promises);
-          })
-          .then((response) => {
-            const data = response.map(({ data }) => data);
-            return data;
-          })
-          .catch((error) => console.log(error));
-      } else {
-        return await api
-          .get(chassis.Thermal['@odata.id'])
-          .then(({ data: { Fans } }) => {
-            return Fans || [];
-          })
-          .catch((error) => console.log(error));
-      }
+      return await api
+        .get(chassis.ThermalSubsystem['@odata.id'])
+        .then((response) => {
+          return api.get(`${response.data.Fans['@odata.id']}`);
+        })
+        .then(({ data: { Members } }) => {
+          const promises = Members.map((member) =>
+            api.get(member['@odata.id']),
+          );
+          return api.all(promises);
+        })
+        .then((response) => {
+          const data = response.map(({ data }) => data);
+          return data;
+        })
+        .catch((error) => console.log(error));
     },
   },
 };
