Fix program exiting immediately and possible NullReferenceException in frmMain_FormClosing.