Fixed a small bug in the update session code