Added serialization validation.