fix duplicate attributes