Fix write struct array in cell array