Autocomplete with custom data and display

Autocomplete with custom data and display

Using this source code I've faced the challenge: custom data displays fine when there is an only "autocomplete" text input. I have two and both of these works as autocomplete, but only second works with custom data.
I think that problem is in this function:
.data( "autocomplete" )._renderItem = function( ul, item ) {
return $( "<li></li>" )
.data( "item.autocomplete", item )
.append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
.appendTo( ul );
};
Tell me please, how to fix this?