fixing the serial char issue