take index page into account for last page