Fix tab close.