       )
 
       req.success((data) =>
-        @customCurvesCollection = new CustomCurveCollection(data)
-        deferred.resolve(@customCurvesCollection)
+        deferred.resolve(new CustomCurveCollection(data))
       )
 
     return deferred.promise()

    @scenarioNav = new ScenarioNavView(model: @scenario, el: $('#scenario-nav'))
    @router      = new Router()
    @analytics   = new Analytics(window.ga);

    @customCurvesCollection = null

    @api = new ApiGateway
      api_path:           globals.api_url

  customCurves: =>
    deferred = $.Deferred()

    if @customCurvesDeferred
      return @customCurvesDeferred
    else
      @customCurvesDeferred = deferred

      # Ajax request.
      req = $.ajax(
        url: App.scenario.url_path() + '/custom_curves?show_unattached=true'
