fixed sendmessage