Transports/SerialOverTCP: Fixed bugs with memory copying. Preparing to merge with master.