Parse int when changing page numbers