         @element.style.display = 'block'
 
         @element.appendChild @createTabs(resultsets)
+        @closedTabs = new Set()
         @selectTab(@selectedIndex)
 
     resizeStarted: (mouseEvent) ->

        title.classList.add 'title'

        attachIcon = tab.appendChild document.createElement('div')
        attachIcon.setAttribute 'tab-index',
        attachIcon.classList.add 'close-icon'
        attachIcon.classList.add 'pin-icon'
        attachIcon.onclick = (e) =>

        closeIcon.classList.add 'close-icon'
        closeIcon.onclick = (e) =>
            tab.style.display = 'none'
            @closedTabs.add tabIndex
            if @tabCount() == 0
                @closeUI()
            else if tabIndex == @selectedIndex
                @selectNearestTab(tabIndex)

        if resultset.statusmessage?
            title.textContent = resultset.statusmessage
