Updated attribute copying logic