fix a problem with serialization of strings.
this caused the posting of AP documents to fail