Fix worong serialization of exceptions generated by domain application.