Fixed autoconnect endlessly looping when no valid ports were found.