diff --git a/xos/models/models.py b/xos/models/models.py
index 2e7df7b..594255a 100644
--- a/xos/models/models.py
+++ b/xos/models/models.py
@@ -15,6 +15,14 @@
 class ProgranService(ProgranService_decl):
     class Meta:
         proxy = True
+    def save(self, *args, **kwargs):
+
+        existing_services = ProgranService.objects.all()
+
+        if len(existing_services) > 0 and not self.delete:
+            raise XOSValidationError("A ProgranService already exists, you should not have more than one")
+
+        super(ProgranService, self).save(*args, **kwargs)
 
 
 class ENodeB(ENodeB_decl):
@@ -33,19 +41,18 @@
 
     def save(self, *args, **kwargs):
         # NOTE someone is setting owner_id, so just override it for now
-        # if not self.owner_id:
-        services = Service.objects.all()
-        services = [s for s in services if s.name.lower() == 'progran']
-
-        # NOTE select the correct owner
         try:
-            progran_service = services[0]
+            # NOTE we allow just one ProgranService
+            progran_service = ProgranService.objects.all()[0]
             self.owner_id = progran_service.id
         except IndexError:
             raise XOSValidationError("Service Progran cannot be found, please make sure that the model exists.")
 
         # NOTE if the instance is new, check that the name is not duplicated
         instances_with_same_name = None
+        # FIXME This may leave us vulnerable to someone changing the name at a later time and causing a conflict.
+        # If that's important to prevent, we could prevent that case when `self.pk!=None`,
+        # filter for ProgranServiceInstance with the same name but `pk!=self.pk`.
         if self.pk is None:
             try:
                 instances_with_same_name = ProgranServiceInstance.objects.get(name=self.name)
