diff --git a/include/ajax.tickets.php b/include/ajax.tickets.php
index cdb1a71ef633b289a9c030184ccac51eb66048dc..d481e1c7cdedbc6c50e1ae2ce5780e74583a9095 100644
--- a/include/ajax.tickets.php
+++ b/include/ajax.tickets.php
@@ -159,7 +159,7 @@ class TicketsAjaxAPI extends AjaxController {
         }
 
         //Assignee
-        if(isset($req['assignee']) && strcasecmp($req['status'], 'closed'))  {
+        if($req['assignee'] && strcasecmp($req['status'], 'closed'))  { # assigned-to
             $id=preg_replace("/[^0-9]/", "", $req['assignee']);
             $assignee = $req['assignee'];
             $where.= ' AND ( ( status.state="open" ';
@@ -179,11 +179,11 @@ class TicketsAjaxAPI extends AjaxController {
             if($req['staffId'] && !$req['status']) //Assigned TO + Closed By
                 $where.= ' OR (ticket.staff_id='.db_input($req['staffId']).
                     ' AND status.state IN("resolved", "closed")) ';
-            elseif(isset($req['staffId'])) // closed by any
+            elseif($req['staffId']) // closed by any
                 $where.= ' OR status.state IN("resolved", "closed") ';
 
             $where.= ' ) ';
-        } elseif($req['staffId']) {
+        } elseif($req['staffId']) { # closed-by
             $where.=' AND (ticket.staff_id='.db_input($req['staffId']).' AND
                 status.state IN("resolved", "closed")) ';
         }
diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php
index 671600b785e20d90df39173482da78c8a5803d9f..a5ad1dcdda5758228392cd5c45c2652406f48bf8 100644
--- a/include/staff/tickets.inc.php
+++ b/include/staff/tickets.inc.php
@@ -591,7 +591,7 @@ if ($results) {
             <select id="assignee" name="assignee">
                 <option value="">&mdash; <?php echo __('Anyone');?> &mdash;</option>
                 <option value="0">&mdash; <?php echo __('Unassigned');?> &mdash;</option>
-                <option value="<?php echo $thisstaff->getId(); ?>"><?php echo __('Me');?></option>
+                <option value="s<?php echo $thisstaff->getId(); ?>"><?php echo __('Me');?></option>
                 <?php
                 if(($users=Staff::getStaffMembers())) {
                     echo '<OPTGROUP label="'.sprintf(__('Agents (%d)'),count($users)).'">';