bug fix: session not defined after server restart