Fixing bug in which the wrong size is used in send for sending messages