fixed sentmessage func

fixed sendmessage func