Fixed discarded calculation.