Added support for multiline chat handling