     else
       @descriptionContainer.style.display = 'none'
 
-  itemsChanged: -> @render()
+  itemsChanged: ->
+    if @model?.items?.length
+      @render()
+    else
+      @returnItemsToPool(0)
 
   render: ->
     @selectedIndex = 0

  renderItem: ({iconHTML, type, snippet, text, displayText, className, replacementPrefix, leftLabel, leftLabelHTML, rightLabel, rightLabelHTML}, index) ->
    li = @ol.childNodes[index]
    unless li
      li = document.createElement('li')
      li.innerHTML = ItemTemplate
      li.dataset.index = index
      @ol.appendChild(li)


      if descLength > longestDesc
        longestDesc = descLength
        longestDescIndex = index
    @updateDescription(items[longestDescIndex])
    @returnItemsToPool(items.length)

  returnItemsToPool: (pivotIndex) ->
    while li = @ol.childNodes[pivotIndex]
      li.remove()
      @nodePool.push(li)
    return

  descriptionLength: (item) ->
    count = 0
