Use a deep clone for the array, instead of slice.
update libs