bug fix on session