bugfix: avoid send empty data to socket