diff --git a/LenovoLegionToolkit.Lib/Extensions/ServiceControllerExtension.cs b/LenovoLegionToolkit.Lib/Extensions/ServiceControllerExtension.cs
index e4d1ea56bb..2852883120 100644
--- a/LenovoLegionToolkit.Lib/Extensions/ServiceControllerExtension.cs
+++ b/LenovoLegionToolkit.Lib/Extensions/ServiceControllerExtension.cs
@@ -25,7 +25,7 @@ public static unsafe void ChangeStartMode(this ServiceController svc, bool enabl
throw new ExternalException("Open Service Error");
var result = PInvoke.ChangeServiceConfig(serviceHandle,
- PInvoke.SERVICE_NO_CHANGE,
+ (ENUM_SERVICE_TYPE)PInvoke.SERVICE_NO_CHANGE,
enabled ? SERVICE_START_TYPE.SERVICE_AUTO_START : SERVICE_START_TYPE.SERVICE_DISABLED,
SERVICE_ERROR.SERVICE_ERROR_NORMAL,
null as string,
diff --git a/LenovoLegionToolkit.Lib/Features/Hybrid/Notify/AbstractDGPUNotify.cs b/LenovoLegionToolkit.Lib/Features/Hybrid/Notify/AbstractDGPUNotify.cs
index e167f749f0..77325758a8 100644
--- a/LenovoLegionToolkit.Lib/Features/Hybrid/Notify/AbstractDGPUNotify.cs
+++ b/LenovoLegionToolkit.Lib/Features/Hybrid/Notify/AbstractDGPUNotify.cs
@@ -142,7 +142,7 @@ private unsafe bool IsDGPUAvailable(HardwareId dgpuHardwareId)
if (PInvoke.CM_Get_DevNode_Status(out var status, out _, deviceInfoData.DevInst, 0) != 0)
continue;
- if ((status & 0x400) != 0)
+ if (status.HasFlag(CM_DEVNODE_STATUS_FLAGS.DN_HAS_PROBLEM))
continue;
return true;
diff --git a/LenovoLegionToolkit.Lib/LenovoLegionToolkit.Lib.csproj b/LenovoLegionToolkit.Lib/LenovoLegionToolkit.Lib.csproj
index 7ca78e320a..e97477fa15 100644
--- a/LenovoLegionToolkit.Lib/LenovoLegionToolkit.Lib.csproj
+++ b/LenovoLegionToolkit.Lib/LenovoLegionToolkit.Lib.csproj
@@ -15,7 +15,7 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive