fix dirPagination bug