Fix error on SubWindow::close.