fix bug of sending message