Bug fix for service types - should be revisited.