fix up negative discount calculation