Fixed an error when saving providers