fixing last page not being numbered correctly