       $scope.newInterfaceMTU = network && network.MTU
 
     $scope.createInterface = (network, mtu, automac, mac) ->
+      return unless checkMainObject()
 
       $scope.createVifWaiting = true # disables form fields
 


    $scope.canAdmin = (id = undefined) ->
      if id == undefined
        id = $scope.VM && $scope.VM.id

      return id && xoApi.canInteract(id, 'administrate') || false

    $scope.canOperate = (id = undefined) ->
      if id == undefined
        id = $scope.VM && $scope.VM.id

      return id && xoApi.canInteract(id, 'operate') || false

    $scope.canView = (id = undefined) ->
      if id == undefined
        id = $scope.VM && $scope.VM.id

      return id && xoApi.canInteract(id, 'view') || false


            () => this.stop(),
            this.baseTimeOut
          )
          promise = if $scope.VM?.id then $scope.refreshStats($scope.VM.id) else $q.reject()
          return promise
          .then () => this._reset()
          .catch (err) =>
            if !this.running || this.attempt >= 2 || $scope.VM.power_state isnt 'Running' || $scope.isVMWorking($scope.VM)
