Fix matricesIndices serialization