Fixed the issue with the log window not closing when the other window is closed