fix applet not being completely removed when a tab is closed