Fix close last window to close console