 
 ensureSubscription = ({ dispatch, getState }) ->
 
-  { _id } = globals.currentGroup
+  { currentGroup: group } = globals
 
   state = getState()
-
-  group = bongo.byId('JGroup', _id)(state)
 
   if group.payment?.subscription
   then dispatch(loadSubscription())

# if there is no payment information for that group, just create one
ensureCustomer = ({ dispatch, getState }) ->

  { _id } = globals.currentGroup

  group = bongo.byId('JGroup', _id)(getState())

  if group.payment
  then dispatch(loadCustomer())

      .then -> ensureCustomer(store)
      .then -> ensureSubscription(store)

  promise.then(console.log.bind(console, 'finished dispatching initial actions'))


