fix error happened while sending message