fixing minor bugs introduced by discount changes