check that last window is not closed