Fixes to array serialization.