Closing the program should no longer crash it (?)