Code style and bug fix

fix the issue caused by judging if page not equals 1