         @queryKites()
           .then (result) =>
             if result?.kites?.length
-            then @switchTo States.ListKites, result
+            then @switchTo States.ListKites, result.kites
             else @switchTo States.Retry, 'No kite instance found'
           .catch (err) =>
+            console.warn "Error:", err
             @switchTo States.Retry, 'Failed to query kites'
 
       when States.Retry

  return map


module.exports = class AddManagedVMModal extends kd.ModalView

  constructor: (options = {}, data) ->

  # Enter your koding.com credentials when asked for
"""

class KiteItem extends kd.ListItemView
  partial: ( { kite } )->
    "#{kite.name} on #{kite.hostname} with #{kite.id} ID"


view             =
