fix sessions closures