# Off by one error in latest.json page 1

**URL:** <https://meta.discourse.org/t/off-by-one-error-in-latest-json-page-1/58622>\
**Category:** Bug\
**Created:** [March 8, 2017, 9:46am UTC](https://meta.discourse.org/t/off-by-one-error-in-latest-json-page-1/58622 "2017-03-08T09:46:44Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![michaeld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/michaeld/32/1594_2.png) [@michaeld](https://meta.discourse.org/u/michaeld)\
**Post date:** [March 16, 2017, 5:06pm UTC](https://meta.discourse.org/t/off-by-one-error-in-latest-json-page-1/58622/6 "2017-03-16T17:06:07Z")

</div>

> [@nbianca](#):
>
> Unfortunately, I do not know where exactly to look to fix this issue. I have been looking through the ListController, but failed. Any suggestions are appreciated.

The code is in `lib/topic_query.rb`

This looks ok:

> <https://github.com/discourse/discourse/blob/main/lib/topic_query.rb#L570-L573>

but then this does not:

> <https://github.com/discourse/discourse/blob/main/lib/topic_query.rb#L305-L311>

---

_[View the full topic](https://meta.discourse.org/t/off-by-one-error-in-latest-json-page-1/58622)._
