Fix for issue #32

Will check if there are other items in the pane before destroying the pane.
Otherwise, destroy the pane if this is the lone item.