 
               JDomain.createDomains {
                 account, stack,
-                domains:hostnameAliases
-                hostnameAlias:hostnameAliases[0]
+                domains: hostnameAliases
+                hostnameAlias: hostnameAliases[0]
+                group: groupSlug
               }
 
               group.addVm vm, (err)=>
                 return callback err  if err
-                JDomain.ensureDomainSettingsForVM {account, vm, type, nickname, groupSlug, stack}
+                JDomain.ensureDomainSettingsForVM {
+                  account, vm, type, nickname, group: groupSlug, stack
+                }
                 if type is 'group'
                   @addVmUsers user, vm, group, ->
                     callback null, vm

    #     return callback err  if err
    #     callback null, [vm]

  # Private static method to fetch domains
  @fetchDomains = (selector, callback)->
    JDomain = require './domain'

                  # Counter created

                  hostnameAliases = JVM.createAliases {
                    nickname:username, uid,
                    type:'user', groupSlug:group
                  }

                  JDomain.createDomains {
                    account, stack, group,
                    domains:hostnameAliases,
                    hostnameAlias:hostnameAliases[0]
                  }
