Fix defect in sessions