diff --git a/src/ApiBundle/Controller/DefaultController.php b/src/ApiBundle/Controller/DefaultController.php
index 4426d80d004ff895a1e3ec1a1d30b6e9ee38daf7..c108c3c3bed6ce06b59f7ac9e6c9cd16d6cac835 100644
--- a/src/ApiBundle/Controller/DefaultController.php
+++ b/src/ApiBundle/Controller/DefaultController.php
@@ -178,6 +178,8 @@ class DefaultController extends FOSRestController
                 $view->setStatusCode(400);
                 $this->getLogger()->err($e->getMessage());
             }
+
+            return $this->handleView($view);
         }
 
         $view->setStatusCode(403);
diff --git a/src/BackendBundle/Repository/LeagueOnDeviceRepository.php b/src/BackendBundle/Repository/LeagueOnDeviceRepository.php
index 50731144bcb913c0d546bd452b0f62d21ea72d5a..8a4e9c38e2e9faa5563b60c9d92ceb6eb8670ad1 100644
--- a/src/BackendBundle/Repository/LeagueOnDeviceRepository.php
+++ b/src/BackendBundle/Repository/LeagueOnDeviceRepository.php
@@ -21,7 +21,7 @@ class LeagueOnDeviceRepository extends EntityRepository
         $em = $this->getEntityManager();
         $qb = $this->getEntityManager()->getRepository('BackendBundle:League')->createQueryBuilder('l');
         $ids = array_map(function ($el) {
-            return $el['id'];
+            return $el->id;
         }, $leagues);
         $qb
             ->select('l')