Fix duplicating class attribute and object attribute