fix bug: if only one page, can't find total page