#77 Fixed computation of last page