Windows crashing the program when attempting to reopen windows after having been closed once already - C#