fix page number smaller than 0 issue

as title