copyArray fix