diff --git a/include/api.tickets.php b/include/api.tickets.php
index e2ee066aefff68921a26dc4bfbd28b62008b7a8e..c209086a9d57a682462f2d2966c5fd41db69b176 100644
--- a/include/api.tickets.php
+++ b/include/api.tickets.php
@@ -40,7 +40,7 @@ class TicketApiController extends ApiController {
         if(!strcasecmp($format, 'email')) {
             $supported = array_merge($supported, array('header', 'mid',
                 'emailId', 'to-email-id', 'ticketId', 'reply-to', 'reply-to-name',
-                'in-reply-to', 'references', 'thread-type',
+                'in-reply-to', 'references', 'thread-type', 'system_emails',
                 'mailflags' => array('bounce', 'auto-reply', 'spam', 'viral'),
                 'recipients' => array('*' => array('name', 'email', 'source'))
                 ));
diff --git a/include/class.staff.php b/include/class.staff.php
index 965b7d429910614015045bf49ead08db9e616237..8c943417b3a8cc0a04aaae8a2aba6278061807ad 100644
--- a/include/class.staff.php
+++ b/include/class.staff.php
@@ -559,7 +559,7 @@ implements AuthenticatedUser, EmailContact, TemplateVariable, Searchable {
         $assigned->add(array('thread__referrals__agent__staff_id' => $this->getId()));
 
         // -- Open and assigned to a team of mine
-        if ($teams = array_filter($this->getTeams())) {
+        if (($teams = array_filter($this->getTeams()))) {
             $assigned->add(array('team_id__in' => $teams));
             $assigned->add(array('thread__referrals__team__team_id__in' => $teams));
         }