fix the problem showing all pages