diff --git a/DDG4/python/DDG4.py b/DDG4/python/DDG4.py
index 34dd78f613d28ba7c379be351e6d842be8c23fa6..e19fa0787638049d8e567f840b4fc7755f995a1b 100644
--- a/DDG4/python/DDG4.py
+++ b/DDG4/python/DDG4.py
@@ -28,7 +28,7 @@ def loadDDG4():
     gSystem.SetDynamicPath(os.environ['DD4HEP_LIBRARY_PATH'])
 
   result = gSystem.Load("libDDG4Plugins")
-  if 0 != result:
+  if result < 0:
     raise Exception('DDG4.py: Failed to load the DDG4 library libDDG4Plugins: '+gSystem.GetErrorStr())
   from ROOT import dd4hep as module
   return module