in reply to tie and untie old value

This issue is discussed in the Mason book.

In short localize %sessions with

local *sessions;
in the root autohandler. Then %sessions automagically gets untied when it goes out of scope.