fix sessions bug