Copied wrong secton of the array