fixed bug array references -> deepCopy