fix bug in session class