clone object before setting