Clear classes in loop