fix issue of graphical glitch when adding several tabs quickly