Fix tab function and styles