   numberOfSections: -> 1
 
 
-  numberOfRowsInSection: ->
+  numberOfRowsInSection: -> @getStacks().size
 
-    @props.stacks
-      .toList()
-      .filter (stack) -> stack.get('title').toLowerCase() isnt 'managed vms'
-      .size
 
 
   renderSectionHeaderAtIndex: -> null


  renderRowAtIndex: (sectionIndex, rowIndex) ->

    stack = @props.stacks.toList().get rowIndex

    stack.get 'machines'
      .sort (a, b) -> a.get('label').localeCompare(b.get('label')) # Sorting from a to z

    onSharedWithUser    : kd.noop
    onUnsharedWithUser  : kd.noop
    onCancelSharing     : kd.noop


  getStacks: ->

    @props.stacks.filter (stack) -> stack.get('title').toLowerCase() isnt 'managed vms'


  onChangeAlwaysOn: (machine, state) ->
