MainWindow BringToFront Logic change