deal with serial port disconnect