fix logwindow crash