Fixed up the code to remove a card so the last card is removed from the UI