fix session time calculation