fix error that applies discount twice