fix bugs of tabs