correct the array copy