fix bug of copy of array