Fix off-by-one bug in post pagination