workaround for tabs.onRemoved bug.