session: bug fix