Clean up old panes when closed