fix bug taht search for the wrong index in removeClass