       else
         KD.singletons.finderController.mountVm vm.name
         vmController.emit 'VMListChanged'
-      paymentModal.destroy()
+      paymentModal?.destroy()
 
     group = KD.singletons.groupsController.getGroupSlug()
 

          KD.remote.api.JRecurlyPlan.getPlanWithCode planCode, (err, plan)->
            plan.subscribe {}, (err, subscription)->
              return cb err  if cb and err
              vmController.createGroupVM type, vmCreateCallback
              cb?()
        KD.remote.api.JRecurlyPlan.getUserAccount (err, account)->
          if err

    

    # Take this to a better place, possibly to payment controller.
    makePayment = (type, plan, callback)->
      planCode = plan.code
      cpuSize  = plan.item.meta.cpu
      if type is 'shared'
        group = KD.singletons.groupsController.getCurrentGroup()
        group.checkPayment (err, payments)->
