Fix bug if the session is not started