Added cloneObject for legacy support