Fix calculation of page number when using go to last page control