Sessions bug fix