Fix discounts pagination. #1551