Fixed bug when pushing discard button