Fix to ensure the first port in the port list is always tried first.