Fix tab addition / deletion issues