Fixed issue where sometimes the configuration would not be saved.