fix total page number when page offset is !=0