Prevent profile assign failure

* when the provider does not exist, the profile is not assigned.
Merge pull request #548 from mfalesni/events_prevent_error_setup

Prevent profile assign failure