fix bug in session