Why do I keep getting run-time errors after only being in the program for a few minutes, and how can I fix it?