You could use a for instead of while to run through all your questions.
With the while loop you are probably restarting the question.