diff --git a/src/core/models/CoreConfigModel.php b/src/core/models/CoreConfigModel.php
index 1ce9ade45d4f4860072c52bf17dbedf2234d7b91..3d23d7b09f1712e314faeaaf5447298208057956 100755
--- a/src/core/models/CoreConfigModel.php
+++ b/src/core/models/CoreConfigModel.php
@@ -115,14 +115,10 @@ class CoreConfigModel
 
             $strpos = strpos($fileContent, "=");
             $substr = substr(trim($fileContent), $strpos + 2, -1);
-            $decode = json_decode($substr);
 
-            if (json_last_error() != JSON_ERROR_NONE) {
-                // decoded String is not a valid JSON String, probably because of an extra ',' at the end
-                $correctedString = substr_replace($substr, '', strlen($substr) - 2, 1);
-
-                $decode = json_decode($correctedString);
-            }
+            $trimmed = rtrim($substr, ',}');
+            $trimmed .= '}';
+            $decode = json_decode($trimmed);
 
             return $decode;
         }