Session bug fix