           @.onData page
         ).bind(@, page)
         onError: (e) ->
-          console.log e
+          console.log 'Error', e
     ).bind(@, page)
   recvPages: (page) ->
     #console.log "recvPages called for #{page}"
     #console.log "Neighbors list: ", @neighbors page
     for p in @neighbors page
-      unless p in @pagesRequested and p in @pagesReceived or p of @cache
+      unless p in @pagesReceived or p of @cache
         #console.log "Requesting #{p}" + (if p is page then " (current)" else " (not current)")
         @recvPage p
   watchman: ->

Meteor.Paginations = {}
Meteor.Pagination = (collection, settings = {}) ->
  @setCollection collection
  @setId collection

        @route "home",
            path: "/"
            template: t
            before: ->
                self.sess "currentPage", 1
        @route "page",
            path: pr
            template: t
            before: ->
                self.sess "currentPage", parseInt(@params.n)
  setTemplates: ->
    name = if @templateName is "" then @name else @templateName
