Prioritise command line port over the random port.