Fix an issue where the connection settings would not be saved the first time on connecting, thus resulting in the old settings being used. Thanks to @Malcrom for finding and reporting the issue!