minor tweak to session handling