Fix: do not remove the view if there is not session.