Fixed stackoverflow with serialization of ChatMessage