Modified Add Component logic in templates service