Fix tab functionality