fixing bug in the flashcards code