Avoid starting session whenever possible
Merge pull request #1983 from umpirsky/fix/issue-1983

Avoid starting session whenever possible