Fix duplicate attribute setting.