fix duplicate attribute, cleanup