change event not working jquery autocomplete
<p>Here is my function i wrote for getting usernames, location, and their pictures. Now the problem is if I use mustMatch option with it, every thing is working fine except for one bug. If lets say i type  S it bring 'Sebastian'  'einstain'. If i select sebastian everything works like charm but if i select einstain it erases everything.</p>

<p>I tried to use change: event but its not firing in any case dont know why</p>

<pre><code>$(document).ready(function(){

  var wp_v = '3';

  $("#searchbox").autocomplete("search.php?wp="+wp_v, {

    matchContains: true,
    //mustMatch: true,
    width: 258,
    scroll: true,
    scrollHeight: 350,
    dataType: 'json',
    change: function (event, ui) {
      alert('change');
      if (!ui.item) {
        $(this).val('');
      }
    },
    parse: function(data) {
      var array = new Array();
      for (var i = 0; i &lt; data.length; i++) {
        array[array.length] = {
          data: data[i],
          value: data[i].name,
          result: data[i].name
        };
      }
      return array;
    },
    formatItem: function(row) {                     
      var output =  "&lt;img class=img src='avatars/" + row.img + "'/&gt; ";             
      output += "&lt;span class=name&gt;"+row.name+"&lt;/span&gt;&lt;br/&gt;";
      output += "&lt;span class=small&gt;"+row.country+"&lt;/span&gt;&lt;br/&gt;";
      return output;
    }

  }).result(function(event,item) {

    if (item == undefined) {
      $('#receiver').val('');
    } else {
      $('#receiver').val(item.uid);
    }

  });

});
</code></pre>

<p>This is the source </p>

<pre><code>[
  {"uid":"2","name":"Sebastian Aparicio","img":"1339875067-Koala.jpeg","country":"Leder"},
  {"uid":"12","name":"Mester Jakob","img":"default.jpeg","country":"Salg"},
  {"uid":"19","name":"Mester Jakob","img":"1339875047-Penguins.jpeg","country":"Leder"}
]
</code></pre>
