fix duplicate attach