diff --git a/~dev_rating/application/classes/Controller/Handler/Settings.php b/~dev_rating/application/classes/Controller/Handler/Settings.php
index 2413000c7bbf577320ccb6da86a199cdc502ba60..22c56795747a1f9d46ff32b74a0d6808fc758101 100644
--- a/~dev_rating/application/classes/Controller/Handler/Settings.php
+++ b/~dev_rating/application/classes/Controller/Handler/Settings.php
@@ -79,19 +79,7 @@ class Controller_Handler_Settings extends Controller_Handler {
         public function action_getDepartmentsList()
         {
             $facultyID = $this->post->offsetGet('facultyID');
-            if($facultyID != 0)
-            {
-                $model = new Model_Admin_Teachers;
-                $departaments = $model->getDepartmentsByFaculty($facultyID);
-                $departamentsHandled = array(); $i = 0;
-                foreach($departaments as $row)
-                {
-                    $i++;
-                    $departamentsHandled[$i]['ID'] = $row['DepID'];
-                    $departamentsHandled[$i]['Name'] = $row['DepName'];
-                }
-                $this->response->body(json_encode($departamentsHandled));
-            }
+            DataArray::factory('Departments')->byFaculty($facultyID)->asArray();
         }
         
         public function action_changeEMail()
diff --git a/~dev_rating/application/classes/Controller/Teacher/Profile.php b/~dev_rating/application/classes/Controller/Teacher/Profile.php
index ebbed69676d7466ee288c4aa62d5fccb2a030954..c55ac8b73c32184d12d2d497f6d38771686c7cb6 100644
--- a/~dev_rating/application/classes/Controller/Teacher/Profile.php
+++ b/~dev_rating/application/classes/Controller/Teacher/Profile.php
@@ -6,7 +6,7 @@ class Controller_Teacher_Profile extends Controller_UserEnvi {
         $twig = Twig::factory('profile/settings');
         $twig->JobPositions = $this->getJobPositions();
         $twig->Faculties = $this->getFaculties();
-        $twig->Departments = DataArray::factory('Departments')->byFaculty($this->UserInfo['FacultyID']);
+        $twig->Departments = DataArray::factory('Departments')->byFaculty($this->UserInfo['FacultyID'])->asArray();
         $twig->User = $this->UserInfo;
         $this->response->body($twig);
     }