Fix for autocomplete delete action removing only the last item