Fix checkStyleToggleVisibility

what difference does the for loop make?