fixed bug in check session