         nameFactory.next (err, uid)=>
           return callback err  if err
 
+          nickname = user.username
           hostnameAliases = JVM.createAliases {
-            nickname : user.username
-            type, uid, groupSlug
+            nickname, type, uid, groupSlug
           }
 
-          JVM.createDomains hostnameAliases
+          JVM.createDomains hostnameAliases, hostnameAliases[0]
 
           vm = new JVM {
             planCode      : planCode

          regYears      : 0
        ).save (err)-> console.log err  if err?

  @createAliases = ({nickname, type, uid, groupSlug})->
    domain       = 'kd.io'
    aliases      = []

    if type is 'user'
      if uid is 0
        aliases.push "#{nickname}.#{groupSlug}.#{domain}"

            return callback err  if err
            group.addVm vm, (err)=>
              return callback err  if err
              JVM.ensureDomainSettings {vm, type, nickname, groupSlug}
              if type is 'group'
                @addVmUsers vm, group, ->
                  callback null, vm
