making sure all session.close calls happen

Change-Id: Ib506c1a6cca5b13aaa957de98bfa837860cd5e4a