Remove object attribute when remiving class attribute