patched serialization