fix array serialization