fix bug of chat