Fixed bug with the sending of messages between client and server.