small bug fix with the session