fix mistake in receivedData + limit chat msg length