Fix tab style and indexOf offset