Fix array and table copying