Help with list becoming empty in the quiz app

Hello App Inventor Community

I am recently working on a project that involves using a list to set up the list of options for the quiz game. To avoid options repeating as an option in the question, I coded so that a temporary list would copy off the original list, and delete the already taken option to avoid repeated values. At the end of the procedure, the temporary list was supposed to reset back to the sample list. However, that is apparently not the case cause currently I receive an empty list error after just 3 questions. Can someone look into the code? It would be much appreciated, thank you.

Screenshot of the code and .aia file is in the attachments.

Error:

RuntimeError. Irritants: (Select list item: Attempt to get item number 1 of a list of length 0: Select list item: List index too large)

GeoQuiz (3).aia (2.7 MB)

You need to use a Copy List block for these two lists.
image

Otherwise, you are also removing items from global OptionList when you remove items from globals TempList and TempAnswerList.

Also, should both of those lists be loaded from the same list?

Oh, thank you. Yes, both of those lists are loaded from the same sample list; one is for the correct answer, and the other is for the four options available.