Update MainWindow.xaml.cs

bug fix!