Fixed a bug with sending a message.