gh-295 review fixes - use a session guard