fix addClass and remove class bug