fix error with deep array clone