fixed serialization for saml2