move call to SET_OBJECT in copy_atttributes