Fix assertion in statistics for zero-length message

Fixes #196

The patch is submitted under MIT license