Count message size correctly