Fixed wrongly calculated message length when there are none ASCII symbols in the message.