Serial port detection fixes