fix session usage