Fix tab switching