session check bug fix