Toms monkey patch to array serialization