Fix bug with pagination view