fix exception serialization