Added fix to raise an error if a sent message has a length that is not between 0 to 256.