fixed small server bug disconnecting the client after sending data.