Fix critical bug when the card is removed during a command is called in rplethreader.