Fixed malformed chat messages breaking JSON decoding.