fix bug max_page compare.