         if vm.planOwner.indexOf("user_") > -1
           @deleteVM vm, callback
         else
-          groupID = vm.planOwner.split('_')[1]
-
+          [{ id: groupId }] = vm.groups
           JGroup = require './group'
-          JGroup.one {_id: groupID}, (err, group)=>
+          JGroup.one { _id: groupId }, (err, group)=>
             return callback err  if err
             JPermissionSet.checkPermission client, "delete vms", group,
             (err, hasPermission)=>

      ldapPassword      :
        type            : String
        default         : -> null
      hostnameAlias     : String
      hostKite          :
        type            : String
        default         : -> null

                          ]]
        default         : if argv.c is 'vagrant' then 'vagrant' else 'sj'
      webHome           : String
      # planOwner         : String
      planCode          : String
      vmType            :
        type            : String
