Prevent profile assign failure

* when the provider does not exist, the profile is not assigned.