Fix not casting the provider of the service