Properly handle zero-length messages.