Twilight Struggle - Deck Reshuffles

Believe we found a bug in the latest release of Twilight Struggle - 3.1.2. Vassal version 3.2.11.

I played “Our Man in Tehran” when there was only 1 card left in the draw deck. The module gave that 1 card to me as well as 4 others, but it still showed the draw deck depleted. I assume it randomly selected the 4 others from the discard pile.

What should have happened is the discard pile shuffled and reset to form a new draw deck, that I then draw new cards from. The lack of a deck during the turn is creating fatal errors later in the turn when we are trying to draw cards for other actions.