Improve serial autodetection.