Fix next page issue with page counter