change check for provider not found to check the provider and not provider.$get