fixes #64, better focus handling when closing the active tab