     @yrange = Collections('Range1d').create({start: 0, end: MAX_FREQ})
 
     @model = Collections('Plot').create(
-      x_range: @xrange
-      y_range: @yrange
+      x_range: @xrange.ref()
+      y_range: @yrange.ref()
       border_fill: "#fff"
       canvas_width: options.width + options.border + 80
       canvas_height: options.height + 2*options.border

    @yrange = Collections('Range1d').create({start: options.y0, end: options.y1})

    @model = Collections('Plot').create(
      x_range: @xrange
      y_range: @yrange
      border_fill: "#fff"
      canvas_width:  options.width  + 2*options.border
      canvas_height: options.height + 2*options.border

    @range = Collections('Range1d').create({start: -20, end: 20})

    @model = Collections('Plot').create(
      x_range: @range.ref()
      y_range: @range.ref()
      border_fill: "#fff"
      canvas_width:  options.width
      canvas_height: options.height
