added guard for array copy
merge