fixed bug when copy an array