Bugfix for deleting closed tabs.