fix duplicateObject