diff --git a/CoefficientEditor/index.php b/CoefficientEditor/index.php
index 68db358911faf5d39da04e55c8dda55ff8e68837..e3e611650d6546cc5422387c1962ec2c3f0899c2 100644
--- a/CoefficientEditor/index.php
+++ b/CoefficientEditor/index.php
@@ -81,29 +81,34 @@ $app->put('/changeCoefficient/gajiPokok', function() use ($app) {
             'subgolongan' => $coefficient->subgolongan,
             'gaji_pokok' => $coefficient->gaji_pokok
         ));
-    }
 
-    $response = new Response();
-    if ($status->success() == true) {
-        $response->setJsonContent(
-            array(
-                'status' => 'OK'
-            )
-        );
-    } else {
-        $response->setStatusCode(409, "Conflict");
-        $errors = array();
-        foreach ($status->getMessages() as $message) {
-            $errors[] = $message->getMessages();
-        }
+        $response = new Response();
+        
+        if ($status->success() != true) {
+            $response->setStatusCode(409, "Conflict");
+            $errors = array();
+            foreach ($status->getMessages() as $message) {
+                $errors[] = $message->getMessages();
+            }
+
+            $response->setJsonContent(
+                array(
+                    'status' => 'ERROR',
+                    'messages' => $errors
+                )
+            );
 
-        $response->setJsonContent(
-            array(
-                'status' => 'ERROR',
-                'messages' => $errors
-            )
-        );
+            return;
+        }
     }
+
+    $response = new Response();
+    $response->setJsonContent(
+        array(
+            'status' => 'OK'
+        )
+    );
+    
     return $response;
 });