change ref array serialisation