Fix bug in issue paging logic