Fix bug in service provider