Improvements to serial port selection