fix bug of no session

fix bug of no session