Fixed adding class Bug