fixed bugs at tabs