Save correct session when there is no tab, references #486