Fixed a bug in addProvider
Misused continue