Fix tab's delete bug (cont)