Fixed the bug where the index of the current card would go backwards based on the user's actions.