fixing pageNumber