fix duplicate attribute issue