fix bug of clicking the pagination