Fixed bug for sending multiple messages