Fix delete of active tab