minor changes to array_copy()