fix bug referencing session