fix(chat): some bug fixes