fixed zero-length message problem in the client