Made it so that the program doesn't terminate when pressing the "x"
button