       @setupFirstLastColumns()
 
       @loadingData = false
-
-      if ((@loadedRows < @_currentView.perPage) && (@loadedRows < @_currentView.totalResults))
-        @appendFlexiData()
-        if (@_currentView.currentPage is @_pagination.last)
+      offset = @_currentView.perPage * (@_currentView.currentPage - 1)
+      if offset > @_currentView.totalResults
+        @_currentView.currentPage = 1
+        @reloadFlexidata()
+      else
+        if ((@loadedRows < @_currentView.perPage) && (@loadedRows < @_currentView.totalResults))
+          @appendFlexiData()
+          if (@_currentView.currentPage is @_pagination.last)
+            $(@element).find(".js-fr-from-page").removeAttr('disabled')
+            @updateURI()
+        else
+          @appendResults = false;
           $(@element).find(".js-fr-from-page").removeAttr('disabled')
+          $(@element).find(".flexirails-container").trigger("complete")
           @updateURI()
-      else
-        @appendResults = false;
-        $(@element).find(".js-fr-from-page").removeAttr('disabled')
-        $(@element).find(".flexirails-container").trigger("complete")
-        @updateURI()
 
     updateURI: ->
       if window.history?


        url = window.location.pathname + "?" + $.param(params)

        window.history.pushState({
          turbolinks: true
          position: Date.now()
        }, null, url)

    appendFlexiData: ->
      if ((@_currentView.perPage * (@_currentView.currentPage - 1) + @loadedRows) < @_currentView.totalResults)

      return _tr

    buildFlexiOptions: (options, override) ->
      opts = getUrlParts(window.location.href)

      $.extend(opts, options)

      opts.current_page = @_currentView.currentPage
      opts.per_page = @_currentView.perPage

