Added the copyAttributes option