 
   go_forward : () ->
     offset = @get('offset')
-    offset = offset + @get('length')
-    maxoffset = @get('maxlength') - @get('length')
+    offset = offset + @length()
+    maxoffset = @get('maxlength') - @length()
     if offset > maxoffset
       offset = maxoffset
     @set('offset', offset)
     @save()
 
   go_end : () ->
-    maxoffset = @get('maxlength') - @get('length')
+    maxoffset = @get('maxlength') - @length()
     @set('offset', maxoffset)
     @save()
 


  pandasgroup : (e) ->
    if e.keyCode == ENTER
     @model.save('group', @fromcsv(@$el.find(".pandasgroup").val()))

  counts : () ->
    @mget('tabledata').data._counts

      height : @mget('height')
      width : @mget('width')
      offset : @mget('offset')
      length : @model.length()
      filterselected : @mget('filterselected')
      maxlength : @mget('maxlength')
      counts : @mget('tabledata').data._counts
