Fixing discard bug