remove attributes after copying them