Fixed discarding bug

Fixed discarding bug