     if durToCompareTo?
       # if the current duration does not overlap with the comparing duration,
       # make a new array of overlaps
-      unless currentDur.rangeDuration.overlaps(durToCompareTo.rangeDuration)
+      unless currentDur.rangeDuration.overlaps(durToCompareTo)
         plansByOverlaps.push([])
 
     currentOverlap = _.last(plansByOverlaps)

      weekTopOffset = _.chain(dayHeights).first(index + 1).reduce((memo, current) ->
        memo + current
      ).value()
      console.info(range.plansByOverlaps)

      _.each(range.plansByOverlaps, (plans) ->
        _.each(plans, (plan, order) ->
          plan.order = order + 1
          plan.weekTopOffset = weekTopOffset
        )
      )
    )


    @updateGroupedDurations(nextProps)

  groupDurations: (durations, viewingDuration, groupingDurations) ->
    durationsInView = _.chain(durations)
      .clone()
      # TODO these parts actually seem like they should be in flux
      .each(@setDuration(viewingDuration))
      .filter(@isInDuration(viewingDuration))
      .sortBy((plan) ->
        -1 * plan.duration.length('days')
      )
      .value()

